mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Merge branch master into dev
This commit is contained in:
commit
2d9fafc05e
@ -0,0 +1,6 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
public enum ADMIN_LEVEL
|
||||||
|
{
|
||||||
|
ALL, OP, SUPER, SENIOR
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface CommandPermissions
|
||||||
|
{
|
||||||
|
ADMIN_LEVEL level();
|
||||||
|
|
||||||
|
SOURCE_TYPE_ALLOWED source();
|
||||||
|
|
||||||
|
boolean block_web_console() default false;
|
||||||
|
|
||||||
|
boolean ignore_permissions() default true;
|
||||||
|
}
|
@ -3,22 +3,16 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_adminmode extends TFM_Command
|
public class Command_adminmode extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("off"))
|
if (args[0].equalsIgnoreCase("off"))
|
||||||
{
|
{
|
||||||
TotalFreedomMod.adminOnlyMode = false;
|
TotalFreedomMod.adminOnlyMode = false;
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -12,12 +10,11 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_cage extends TFM_Command
|
public class Command_cage extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -54,6 +51,15 @@ public class Command_cage extends TFM_Command
|
|||||||
{
|
{
|
||||||
cage_material_outer = Material.matchMaterial(args[1]);
|
cage_material_outer = Material.matchMaterial(args[1]);
|
||||||
if (cage_material_outer == null)
|
if (cage_material_outer == null)
|
||||||
|
{
|
||||||
|
TFM_Util.adminAction(sender.getName(), "Uncaging " + p.getName(), true);
|
||||||
|
playerdata.setCaged(false);
|
||||||
|
playerdata.regenerateHistory();
|
||||||
|
playerdata.clearHistory();
|
||||||
|
sender.sendMessage(ChatColor.GREEN + p.getName() + " uncaged.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cage_material_outer = Material.GLASS;
|
cage_material_outer = Material.GLASS;
|
||||||
}
|
}
|
||||||
@ -79,15 +85,8 @@ public class Command_cage extends TFM_Command
|
|||||||
TFM_Util.buildHistory(target_pos, 2, playerdata);
|
TFM_Util.buildHistory(target_pos, 2, playerdata);
|
||||||
TFM_Util.generateCube(target_pos, 2, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.OUTER));
|
TFM_Util.generateCube(target_pos, 2, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.OUTER));
|
||||||
TFM_Util.generateCube(target_pos, 1, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.INNER));
|
TFM_Util.generateCube(target_pos, 1, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.INNER));
|
||||||
|
|
||||||
p.setGameMode(GameMode.SURVIVAL);
|
p.setGameMode(GameMode.SURVIVAL);
|
||||||
TFM_Util.adminAction(sender.getName(), "Caging " + p.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Caging " + p.getName(), true);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -10,12 +9,11 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_cake extends TFM_Command
|
public class Command_cake extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
StringBuilder output = new StringBuilder();
|
StringBuilder output = new StringBuilder();
|
||||||
Random randomGenerator = new Random();
|
Random randomGenerator = new Random();
|
||||||
@ -33,11 +31,6 @@ public class Command_cake extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
TFM_Util.bcastMsg(output.toString());
|
TFM_Util.bcastMsg(output.toString());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_cartsit extends TFM_Command
|
public class Command_cartsit extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,36 +1,18 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
//This command was coded initially by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
|
|
||||||
public class Command_clearall extends TFM_Command
|
public class Command_clearall extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole))
|
server.dispatchCommand(sender, "rd");
|
||||||
{
|
server.dispatchCommand(sender, "denick");
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
server.dispatchCommand(sender, "uall");
|
||||||
}
|
|
||||||
|
|
||||||
CommandSender cSender;
|
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
cSender = server.getConsoleSender();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cSender = sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
server.dispatchCommand(cSender, "rd"); // remove entities
|
|
||||||
server.dispatchCommand(cSender, "denick"); // remove nicks
|
|
||||||
server.dispatchCommand(cSender, "uall"); // undisguise all
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,14 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_cmdlist extends TFM_Command
|
public class Command_cmdlist extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -42,7 +43,7 @@ public class Command_cmdlist extends TFM_Command
|
|||||||
|
|
||||||
Collections.sort(commands);
|
Collections.sort(commands);
|
||||||
|
|
||||||
sender.sendMessage(TFM_Util.implodeStringList(",", commands));
|
sender.sendMessage(StringUtils.join(commands, ","));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_creative extends TFM_Command
|
public class Command_creative extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -21,12 +21,6 @@ public class Command_creative extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player p;
|
Player p;
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
|
@ -1,35 +1,21 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, ignore_permissions = false)
|
||||||
public class Command_csay extends TFM_Command
|
public class Command_csay extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
if (args.length > 0)
|
||||||
{
|
{
|
||||||
String sender_name = sender.getName();
|
TFM_Util.bcastMsg(String.format("§7[CONSOLE]§f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " ")));
|
||||||
|
|
||||||
sender_name = sender_name.split("-")[0];
|
|
||||||
|
|
||||||
StringBuilder outmessage_bldr = new StringBuilder();
|
|
||||||
for (int i = 0; i < args.length; i++)
|
|
||||||
{
|
|
||||||
outmessage_bldr.append(args[i]).append(" ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TFM_Util.bcastMsg(String.format("§7[CONSOLE]§f<§c%s§f> %s", sender_name, outmessage_bldr.toString().trim()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
//This command was coded initially by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
|
|
||||||
public class Command_deop extends TFM_Command
|
public class Command_deop extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_deopall extends TFM_Command
|
public class Command_deopall extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole)
|
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "De-opping all players on the server", true);
|
TFM_Util.adminAction(sender.getName(), "De-opping all players on the server", true);
|
||||||
|
|
||||||
@ -21,11 +19,6 @@ public class Command_deopall extends TFM_Command
|
|||||||
p.setOp(false);
|
p.setOp(false);
|
||||||
p.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP);
|
p.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,107 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.Dispenser;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
|
public class Command_dispfill extends TFM_Command
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
if (args.length == 2)
|
||||||
|
{
|
||||||
|
int radius;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
radius = Math.max(5, Math.min(25, Integer.parseInt(args[0])));
|
||||||
|
}
|
||||||
|
catch (NumberFormatException ex)
|
||||||
|
{
|
||||||
|
sender.sendMessage("Invalid radius.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] items_raw = StringUtils.split(args[1], ",");
|
||||||
|
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||||
|
for (String search_item : items_raw)
|
||||||
|
{
|
||||||
|
ItemStack is = null;
|
||||||
|
|
||||||
|
is = new ItemStack(Material.matchMaterial(search_item), 64);
|
||||||
|
|
||||||
|
if (is == null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
is = new ItemStack(Integer.parseInt(search_item), 64);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is != null)
|
||||||
|
{
|
||||||
|
items.add(is);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.sendMessage("Skipping invalid item: " + search_item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ItemStack[] items_array = items.toArray(new ItemStack[items.size()]);
|
||||||
|
|
||||||
|
int affected = 0;
|
||||||
|
Location center_location = sender_p.getLocation();
|
||||||
|
Block center_block = center_location.getBlock();
|
||||||
|
for (int x_offset = -radius; x_offset <= radius; x_offset++)
|
||||||
|
{
|
||||||
|
for (int y_offset = -radius; y_offset <= radius; y_offset++)
|
||||||
|
{
|
||||||
|
for (int z_offset = -radius; z_offset <= radius; z_offset++)
|
||||||
|
{
|
||||||
|
Block target_block = center_block.getRelative(x_offset, y_offset, z_offset);
|
||||||
|
if (target_block.getLocation().distanceSquared(center_location) < (radius * radius))
|
||||||
|
{
|
||||||
|
if (target_block.getType().equals(Material.DISPENSER))
|
||||||
|
{
|
||||||
|
sender.sendMessage("Filling dispenser @ " + TFM_Util.formatLocation(target_block.getLocation()));
|
||||||
|
setDispenserContents(target_block, items_array);
|
||||||
|
affected++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage("Done. " + affected + " dispenser(s) filled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setDispenserContents(Block target_block, ItemStack[] items)
|
||||||
|
{
|
||||||
|
Dispenser dispenser = (Dispenser) target_block.getState();
|
||||||
|
Inventory disp_inv = dispenser.getInventory();
|
||||||
|
disp_inv.clear();
|
||||||
|
disp_inv.addItem(items);
|
||||||
|
}
|
||||||
|
}
|
@ -2,24 +2,18 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, ignore_permissions = false)
|
||||||
public class Command_doom extends TFM_Command
|
public class Command_doom extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(final CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(final CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(senderIsConsole && TFM_SuperadminList.isSeniorAdmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,29 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_enchant extends TFM_Command
|
public class Command_enchant extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_ender extends TFM_Command
|
public class Command_ender extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,23 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_expel extends TFM_Command
|
public class Command_expel extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
}
|
|
||||||
else if (TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
double radius = 50.0;
|
double radius = 50.0;
|
||||||
double strength = 100.0;
|
double strength = 100.0;
|
||||||
@ -68,11 +61,6 @@ public class Command_expel extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_explosives extends TFM_Command
|
public class Command_explosives extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -39,11 +37,6 @@ public class Command_explosives extends TFM_Command
|
|||||||
TotalFreedomMod.allowExplosions = false;
|
TotalFreedomMod.allowExplosions = false;
|
||||||
sender.sendMessage("Explosives are now disabled.");
|
sender.sendMessage("Explosives are now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_fireplace extends TFM_Command
|
public class Command_fireplace extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_fireplace extends TFM_Command
|
|||||||
TotalFreedomMod.allowFirePlace = false;
|
TotalFreedomMod.allowFirePlace = false;
|
||||||
sender.sendMessage("Fire placement is now disabled.");
|
sender.sendMessage("Fire placement is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_firespread extends TFM_Command
|
public class Command_firespread extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_firespread extends TFM_Command
|
|||||||
TotalFreedomMod.allowFireSpread = false;
|
TotalFreedomMod.allowFireSpread = false;
|
||||||
sender.sendMessage("Fire spread is now disabled.");
|
sender.sendMessage("Fire spread is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_flatlands extends TFM_Command
|
public class Command_flatlands extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_fluidspread extends TFM_Command
|
public class Command_fluidspread extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_fluidspread extends TFM_Command
|
|||||||
TotalFreedomMod.allowFliudSpread = false;
|
TotalFreedomMod.allowFliudSpread = false;
|
||||||
sender.sendMessage("Lava and water spread is now disabled.");
|
sender.sendMessage("Lava and water spread is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
@ -9,12 +8,11 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_fr extends TFM_Command
|
public class Command_fr extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -67,11 +65,6 @@ public class Command_fr extends TFM_Command
|
|||||||
p.sendMessage(ChatColor.AQUA + "You have been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + ".");
|
p.sendMessage(ChatColor.AQUA + "You have been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_fuckoff extends TFM_Command
|
public class Command_fuckoff extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || !TFM_SuperadminList.isSeniorAdmin(sender_p)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
@ -9,6 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_gadmin extends TFM_Command
|
public class Command_gadmin extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -21,8 +21,6 @@ public class Command_gadmin extends TFM_Command
|
|||||||
|
|
||||||
String mode = args[0].toLowerCase();
|
String mode = args[0].toLowerCase();
|
||||||
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
if (mode.equals("list"))
|
if (mode.equals("list"))
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + "[ Real Name ] : [ Display Name ] - Hash:");
|
sender.sendMessage(ChatColor.GRAY + "[ Real Name ] : [ Display Name ] - Hash:");
|
||||||
@ -34,6 +32,7 @@ public class Command_gadmin extends TFM_Command
|
|||||||
if (mode.equals("list"))
|
if (mode.equals("list"))
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + String.format("[ %s ] : [ %s ] - %s",
|
sender.sendMessage(ChatColor.GRAY + String.format("[ %s ] : [ %s ] - %s",
|
||||||
|
p.getName(),
|
||||||
ChatColor.stripColor(p.getDisplayName()),
|
ChatColor.stripColor(p.getDisplayName()),
|
||||||
hash));
|
hash));
|
||||||
}
|
}
|
||||||
@ -43,12 +42,12 @@ public class Command_gadmin extends TFM_Command
|
|||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Kicking " + p.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Kicking " + p.getName(), true);
|
||||||
p.kickPlayer("Kicked by Administrator");
|
p.kickPlayer("Kicked by Administrator");
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (mode.equals("nameban"))
|
else if (mode.equals("nameban"))
|
||||||
{
|
{
|
||||||
//server.getOfflinePlayer(p.getName()).setBanned(true);
|
|
||||||
TFM_Util.banUsername(p.getName(), null, null, null);
|
TFM_Util.banUsername(p.getName(), null, null, null);
|
||||||
TFM_Util.adminAction(sender.getName(), "Banning name: " + p.getName(), true);
|
TFM_Util.bcastMsg(String.format("Banning Name: %s.", p.getName()), ChatColor.RED);
|
||||||
p.kickPlayer("Username banned by Administrator.");
|
p.kickPlayer("Username banned by Administrator.");
|
||||||
}
|
}
|
||||||
else if (mode.equals("ipban"))
|
else if (mode.equals("ipban"))
|
||||||
@ -59,8 +58,7 @@ public class Command_gadmin extends TFM_Command
|
|||||||
{
|
{
|
||||||
user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]);
|
user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]);
|
||||||
}
|
}
|
||||||
TFM_Util.adminAction(sender.getName(), "Banning name: " + p.getName(), true);
|
TFM_Util.bcastMsg(String.format("Banning IP: %s.", p.getName(), user_ip), ChatColor.RED);
|
||||||
//server.banIP(user_ip);
|
|
||||||
TFM_Util.banIP(user_ip, null, null, null);
|
TFM_Util.banIP(user_ip, null, null, null);
|
||||||
p.kickPlayer("IP address banned by Administrator.");
|
p.kickPlayer("IP address banned by Administrator.");
|
||||||
}
|
}
|
||||||
@ -72,21 +70,20 @@ public class Command_gadmin extends TFM_Command
|
|||||||
{
|
{
|
||||||
user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]);
|
user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]);
|
||||||
}
|
}
|
||||||
TFM_Util.adminAction(sender.getName(), "Banning " + p.getName() + ", IP " + user_ip, true);
|
TFM_Util.bcastMsg(String.format("Banning Name: %s, IP: %s.", p.getName(), user_ip), ChatColor.RED);
|
||||||
//server.getOfflinePlayer(p.getName()).setBanned(true);
|
|
||||||
TFM_Util.banIP(user_ip, null, null, null);
|
TFM_Util.banIP(user_ip, null, null, null);
|
||||||
TFM_Util.banUsername(p.getName(), null, null, null);
|
TFM_Util.banUsername(p.getName(), null, null, null);
|
||||||
p.kickPlayer("IP and username banned by Administrator.");
|
p.kickPlayer("IP and username banned by Administrator.");
|
||||||
}
|
}
|
||||||
else if (mode.equals("op"))
|
else if (mode.equals("op"))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Opping " + p.getName(), false);
|
TFM_Util.bcastMsg(String.format("(%s: Opping %s)", sender.getName(), p.getName()), ChatColor.GRAY);
|
||||||
p.setOp(false);
|
p.setOp(false);
|
||||||
p.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
p.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
||||||
}
|
}
|
||||||
else if (mode.equals("deop"))
|
else if (mode.equals("deop"))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "De-opping " + p.getName(), false);
|
TFM_Util.bcastMsg(String.format("(%s: De-opping %s)", sender.getName(), p.getName()), ChatColor.GRAY);
|
||||||
p.setOp(false);
|
p.setOp(false);
|
||||||
p.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP);
|
p.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP);
|
||||||
}
|
}
|
||||||
@ -99,7 +96,7 @@ public class Command_gadmin extends TFM_Command
|
|||||||
TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p);
|
TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p);
|
||||||
playerdata.setFrozen(!playerdata.isFrozen());
|
playerdata.setFrozen(!playerdata.isFrozen());
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Freezing " + p.getName(), false);
|
sender.sendMessage(ChatColor.AQUA + p.getName() + " has been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + ".");
|
||||||
p.sendMessage(ChatColor.AQUA + "You have been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + ".");
|
p.sendMessage(ChatColor.AQUA + "You have been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,11 +108,6 @@ public class Command_gadmin extends TFM_Command
|
|||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.RED + "Invalid hash.");
|
sender.sendMessage(ChatColor.RED + "Invalid hash.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_gcmd extends TFM_Command
|
public class Command_gcmd extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
@ -62,11 +59,6 @@ public class Command_gcmd extends TFM_Command
|
|||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + "Error sending command: " + ex.getMessage());
|
sender.sendMessage(ChatColor.GRAY + "Error sending command: " + ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,15 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserList;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserList.TFM_UserListEntry;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserList.TFM_UserListEntry;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_glist extends TFM_Command
|
public class Command_glist extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -21,8 +21,6 @@ public class Command_glist extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
if (args.length == 1)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("purge"))
|
if (args[0].equalsIgnoreCase("purge"))
|
||||||
@ -68,7 +66,7 @@ public class Command_glist extends TFM_Command
|
|||||||
String mode = args[0].toLowerCase();
|
String mode = args[0].toLowerCase();
|
||||||
if (mode.equalsIgnoreCase("ban"))
|
if (mode.equalsIgnoreCase("ban"))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Banning " + username + " and IPs: " + TFM_Util.implodeStringList(",", ip_addresses), true);
|
TFM_Util.adminAction(sender.getName(), "Banning " + username + " and IPs: " + StringUtils.join(ip_addresses, ","), true);
|
||||||
|
|
||||||
Player p = server.getPlayerExact(username);
|
Player p = server.getPlayerExact(username);
|
||||||
if (p != null)
|
if (p != null)
|
||||||
@ -94,7 +92,7 @@ public class Command_glist extends TFM_Command
|
|||||||
}
|
}
|
||||||
else if (mode.equalsIgnoreCase("unban"))
|
else if (mode.equalsIgnoreCase("unban"))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Unbanning " + username + " and IPs: " + TFM_Util.implodeStringList(",", ip_addresses), true);
|
TFM_Util.adminAction(sender.getName(), "Unbanning " + username + " and IPs: " + StringUtils.join(ip_addresses, ","), true);
|
||||||
|
|
||||||
//server.getOfflinePlayer(username).setBanned(false);
|
//server.getOfflinePlayer(username).setBanned(false);
|
||||||
TFM_Util.unbanUsername(username);
|
TFM_Util.unbanUsername(username);
|
||||||
@ -108,11 +106,6 @@ public class Command_glist extends TFM_Command
|
|||||||
TFM_Util.unbanIP(ip_address_parts[0] + "." + ip_address_parts[1] + ".*.*");
|
TFM_Util.unbanIP(ip_address_parts[0] + "." + ip_address_parts[1] + ".*.*");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -10,6 +8,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_gtfo extends TFM_Command
|
public class Command_gtfo extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -20,8 +19,6 @@ public class Command_gtfo extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
Player p;
|
Player p;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -81,13 +78,7 @@ public class Command_gtfo extends TFM_Command
|
|||||||
|
|
||||||
// kick Player:
|
// kick Player:
|
||||||
p.kickPlayer("GTFO");
|
p.kickPlayer("GTFO");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,23 +3,17 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_halt extends TFM_Command
|
public class Command_halt extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -107,7 +101,7 @@ public class Command_halt extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setHalted(Player p, boolean is_halted)
|
private static void setHalted(Player p, boolean is_halted)
|
||||||
{
|
{
|
||||||
TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p);
|
TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p);
|
||||||
|
|
||||||
|
@ -2,22 +2,16 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.BOTH, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_kicknoob extends TFM_Command
|
public class Command_kicknoob extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Disconnecting all non-superadmins.", true);
|
TFM_Util.adminAction(sender.getName(), "Disconnecting all non-superadmins.", true);
|
||||||
|
|
||||||
for (Player p : server.getOnlinePlayers())
|
for (Player p : server.getOnlinePlayers())
|
||||||
|
@ -10,16 +10,13 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_landmine extends TFM_Command
|
public class Command_landmine extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
if (!TotalFreedomMod.landminesEnabled)
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
}
|
|
||||||
else if (!TotalFreedomMod.landminesEnabled)
|
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GREEN + "The landmine is currently disabled.");
|
sender.sendMessage(ChatColor.GREEN + "The landmine is currently disabled.");
|
||||||
}
|
}
|
||||||
@ -47,10 +44,6 @@ public class Command_landmine extends TFM_Command
|
|||||||
|
|
||||||
sender.sendMessage(ChatColor.GREEN + "Landmine planted. Radius: " + radius + " blocks.");
|
sender.sendMessage(ChatColor.GREEN + "Landmine planted. Radius: " + radius + " blocks.");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_lavadmg extends TFM_Command
|
public class Command_lavadmg extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_lavadmg extends TFM_Command
|
|||||||
TotalFreedomMod.allowLavaDamage = false;
|
TotalFreedomMod.allowLavaDamage = false;
|
||||||
sender.sendMessage("Lava damage is now disabled.");
|
sender.sendMessage("Lava damage is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_lavaplace extends TFM_Command
|
public class Command_lavaplace extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_lavaplace extends TFM_Command
|
|||||||
TotalFreedomMod.allowLavaPlace = false;
|
TotalFreedomMod.allowLavaPlace = false;
|
||||||
sender.sendMessage("Lava placement is now disabled.");
|
sender.sendMessage("Lava placement is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_list extends TFM_Command
|
public class Command_list extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,27 +1,20 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitScheduler;
|
import org.bukkit.scheduler.BukkitScheduler;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_lockup extends TFM_Command
|
public class Command_lockup extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(senderIsConsole && TFM_SuperadminList.isSeniorAdmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length == 1)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("all"))
|
if (args[0].equalsIgnoreCase("all"))
|
||||||
|
@ -1,23 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, ignore_permissions = false)
|
||||||
public class Command_moblimiter extends TFM_Command
|
public class Command_moblimiter extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_mp extends TFM_Command
|
public class Command_mp extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || sender.isOp())
|
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + "Purging all mobs...");
|
sender.sendMessage(ChatColor.GRAY + "Purging all mobs...");
|
||||||
|
|
||||||
@ -30,11 +28,6 @@ public class Command_mp extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(ChatColor.GRAY + String.valueOf(removed) + " mobs removed.");
|
sender.sendMessage(ChatColor.GRAY + String.valueOf(removed) + " mobs removed.");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -9,21 +9,18 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_mp44 extends TFM_Command
|
public class Command_mp44 extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
if (!TotalFreedomMod.mp44Enabled)
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
}
|
|
||||||
else if (!TotalFreedomMod.mp44Enabled)
|
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GREEN + "The mp44 is currently disabled.");
|
sender.sendMessage(ChatColor.GREEN + "The mp44 is currently disabled.");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (sender.isOp())
|
|
||||||
{
|
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -46,11 +43,6 @@ public class Command_mp44 extends TFM_Command
|
|||||||
|
|
||||||
sender.sendMessage(ChatColor.GREEN + "mp44 Disarmed.");
|
sender.sendMessage(ChatColor.GREEN + "mp44 Disarmed.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_nether extends TFM_Command
|
public class Command_nether extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,23 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_nonuke extends TFM_Command
|
public class Command_nonuke extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -2,24 +2,18 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.PropertyManager;
|
import net.minecraft.server.PropertyManager;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_onlinemode extends TFM_Command
|
public class Command_onlinemode extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("Server is currently running with 'online-mode=" + (server.getOnlineMode() ? "true" : "false") + "'.");
|
sender.sendMessage("Server is currently running with 'online-mode=" + (server.getOnlineMode() ? "true" : "false") + "'.");
|
||||||
|
@ -2,26 +2,18 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
//This command was coded initially by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
|
|
||||||
public class Command_op extends TFM_Command
|
public class Command_op extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -54,7 +46,6 @@ public class Command_op extends TFM_Command
|
|||||||
TFM_Util.playerMsg(sender, "That player is not online.");
|
TFM_Util.playerMsg(sender, "That player is not online.");
|
||||||
TFM_Util.playerMsg(sender, "You don't have permissions to OP offline players.", ChatColor.YELLOW);
|
TFM_Util.playerMsg(sender, "You don't have permissions to OP offline players.", ChatColor.YELLOW);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -8,12 +7,11 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_opall extends TFM_Command
|
public class Command_opall extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole)
|
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Opping all players on the server", false);
|
TFM_Util.adminAction(sender.getName(), "Opping all players on the server", false);
|
||||||
|
|
||||||
@ -43,11 +41,6 @@ public class Command_opall extends TFM_Command
|
|||||||
p.setGameMode(targetGamemode);
|
p.setGameMode(targetGamemode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,31 +1,20 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_opme extends TFM_Command
|
public class Command_opme extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
}
|
|
||||||
else if (TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Opping " + sender.getName(), false);
|
TFM_Util.adminAction(sender.getName(), "Opping " + sender.getName(), false);
|
||||||
sender.setOp(true);
|
sender.setOp(true);
|
||||||
sender.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
sender.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -8,17 +8,12 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_ops extends TFM_Command
|
public class Command_ops extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(senderIsConsole || sender.isOp()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1 || args.length > 1)
|
if (args.length < 1 || args.length > 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_orbit extends TFM_Command
|
public class Command_orbit extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -41,7 +40,7 @@ public class Command_orbit extends TFM_Command
|
|||||||
{
|
{
|
||||||
if (TFM_Util.isStopCommand(args[1]))
|
if (TFM_Util.isStopCommand(args[1]))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Stopping " + p.getName() + "'s Orbit", true);
|
sender.sendMessage(ChatColor.GRAY + "Stopped orbiting " + p.getName());
|
||||||
playerdata.stopOrbiting();
|
playerdata.stopOrbiting();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -50,8 +49,10 @@ public class Command_orbit extends TFM_Command
|
|||||||
{
|
{
|
||||||
strength = Math.max(1.0, Math.min(150.0, Double.parseDouble(args[1])));
|
strength = Math.max(1.0, Math.min(150.0, Double.parseDouble(args[1])));
|
||||||
}
|
}
|
||||||
catch (NumberFormatException nfex)
|
catch (NumberFormatException ex)
|
||||||
{
|
{
|
||||||
|
sender.sendMessage(ex.getMessage());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,13 +60,7 @@ public class Command_orbit extends TFM_Command
|
|||||||
playerdata.startOrbiting(strength);
|
playerdata.startOrbiting(strength);
|
||||||
|
|
||||||
p.setVelocity(new Vector(0, strength, 0));
|
p.setVelocity(new Vector(0, strength, 0));
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Orbiting " + p.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Orbiting " + p.getName(), true);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -7,17 +7,12 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_permban extends TFM_Command
|
public class Command_permban extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -26,24 +21,19 @@ public class Command_permban extends TFM_Command
|
|||||||
if (args[0].equalsIgnoreCase("list"))
|
if (args[0].equalsIgnoreCase("list"))
|
||||||
{
|
{
|
||||||
dumplist(sender);
|
dumplist(sender);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("reload"))
|
||||||
if (!senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("reload"))
|
|
||||||
{
|
{
|
||||||
TFM_Util.playerMsg(sender, "Reloading permban list...", ChatColor.RED);
|
TFM_Util.playerMsg(sender, "Reloading permban list...", ChatColor.RED);
|
||||||
plugin.loadPermbanConfig();
|
plugin.loadPermbanConfig();
|
||||||
dumplist(sender);
|
dumplist(sender);
|
||||||
return true;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dumplist(CommandSender sender)
|
private void dumplist(CommandSender sender)
|
||||||
|
@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -12,17 +11,12 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_potion extends TFM_Command
|
public class Command_potion extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length == 1 || args.length == 2)
|
if (args.length == 1 || args.length == 2)
|
||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("list"))
|
if (args[0].equalsIgnoreCase("list"))
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_prelog extends TFM_Command
|
public class Command_prelog extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
@ -28,11 +26,6 @@ public class Command_prelog extends TFM_Command
|
|||||||
TotalFreedomMod.preprocessLogEnabled = false;
|
TotalFreedomMod.preprocessLogEnabled = false;
|
||||||
sender.sendMessage("Command preprocess logging is now disabled.");
|
sender.sendMessage("Command preprocess logging is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,18 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
|
import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_protectarea extends TFM_Command
|
public class Command_protectarea extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TotalFreedomMod.protectedAreasEnabled)
|
if (!TotalFreedomMod.protectedAreasEnabled)
|
||||||
{
|
{
|
||||||
sender.sendMessage("Protected areas are currently disabled in the TotalFreedomMod configuration.");
|
sender.sendMessage("Protected areas are currently disabled in the TotalFreedomMod configuration.");
|
||||||
@ -97,7 +91,9 @@ public class Command_protectarea extends TFM_Command
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_qdeop extends TFM_Command
|
public class Command_qdeop extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -16,13 +17,6 @@ public class Command_qdeop extends TFM_Command
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean silent = false;
|
boolean silent = false;
|
||||||
if (args.length == 2)
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_qop extends TFM_Command
|
public class Command_qop extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -16,12 +17,6 @@ public class Command_qop extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(senderIsConsole || sender.isOp()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean silent = false;
|
boolean silent = false;
|
||||||
if (args.length == 2)
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
|
@ -4,24 +4,18 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_RadarData;
|
import me.StevenLawson.TotalFreedomMod.TFM_RadarData;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_radar extends TFM_Command
|
public class Command_radar extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Location sender_pos = sender_p.getLocation();
|
Location sender_pos = sender_p.getLocation();
|
||||||
|
|
||||||
List<TFM_RadarData> radar_data = new ArrayList<TFM_RadarData>();
|
List<TFM_RadarData> radar_data = new ArrayList<TFM_RadarData>();
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_rank extends TFM_Command
|
public class Command_rank extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,30 +1,22 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import org.bukkit.ChatColor;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_rawsay extends TFM_Command
|
public class Command_rawsay extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
if (args.length > 0)
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
TFM_Util.bcastMsg(StringUtils.join(args, " "));
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFM_Util.bcastMsg(TFM_Util.implodeStringList(" ", Arrays.asList(args)));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_rd extends TFM_Command
|
public class Command_rd extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This terminology is wrong, this doesn't remove *all* entities, by far. - Madgeek
|
// This terminology is wrong, this doesn't remove *all* entities, by far. - Madgeek
|
||||||
// Back when I was just a player, I didn't even know what "entity" meant... :P - Darth
|
// Back when I was just a player, I didn't even know what "entity" meant... :P - Darth
|
||||||
TFM_Util.adminAction(sender.getName(), "Removing all server entities.", false);
|
TFM_Util.adminAction(sender.getName(), "Removing all server entities.", false);
|
||||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_saconfig extends TFM_Command
|
public class Command_saconfig extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_say extends TFM_Command
|
public class Command_say extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -19,11 +18,11 @@ public class Command_say extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String message = TFM_Util.implodeStringList(" ", Arrays.asList(args));
|
String message = StringUtils.join(args, " ");
|
||||||
|
|
||||||
if (senderIsConsole && sender.getName().equals("Rcon"))
|
if (senderIsConsole && TFM_Util.isFromClanforge(sender.getName()))
|
||||||
{
|
{
|
||||||
if (message.equals("WARNING: Server is restarting, you will be kicked"))
|
if (message.equalsIgnoreCase("WARNING: Server is restarting, you will be kicked"))
|
||||||
{
|
{
|
||||||
TFM_Util.bcastMsg("Server is going offline.", ChatColor.GRAY);
|
TFM_Util.bcastMsg("Server is going offline.", ChatColor.GRAY);
|
||||||
|
|
||||||
@ -38,14 +37,7 @@ public class Command_say extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
TFM_Util.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE);
|
TFM_Util.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,16 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_setlevel extends TFM_Command
|
public class Command_setlevel extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
|
import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -10,23 +9,12 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_setspawnworld extends TFM_Command
|
public class Command_setspawnworld extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Location pos = sender_p.getLocation();
|
Location pos = sender_p.getLocation();
|
||||||
sender_p.getWorld().setSpawnLocation(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
|
sender_p.getWorld().setSpawnLocation(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -11,7 +9,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
// readded by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_smite extends TFM_Command
|
public class Command_smite extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -22,12 +20,6 @@ public class Command_smite extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player p;
|
Player p;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.ALL, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = true)
|
||||||
public class Command_status extends TFM_Command
|
public class Command_status extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,13 +3,11 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
import me.StevenLawson.TotalFreedomMod.TFM_UserInfo;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
//This command was coded initially by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
|
|
||||||
public class Command_stfu extends TFM_Command
|
public class Command_stfu extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -20,12 +18,6 @@ public class Command_stfu extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("list"))
|
if (args[0].equalsIgnoreCase("list"))
|
||||||
{
|
{
|
||||||
TFM_Util.playerMsg(sender, "Muted players:");
|
TFM_Util.playerMsg(sender, "Muted players:");
|
||||||
@ -44,10 +36,8 @@ public class Command_stfu extends TFM_Command
|
|||||||
{
|
{
|
||||||
TFM_Util.playerMsg(sender, "- none");
|
TFM_Util.playerMsg(sender, "- none");
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("purge"))
|
||||||
if (args[0].equalsIgnoreCase("purge"))
|
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Unmuting all players.", true);
|
TFM_Util.adminAction(sender.getName(), "Unmuting all players.", true);
|
||||||
TFM_UserInfo info;
|
TFM_UserInfo info;
|
||||||
@ -62,10 +52,8 @@ public class Command_stfu extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TFM_Util.playerMsg(sender, "Unmuted " + count + " players.");
|
TFM_Util.playerMsg(sender, "Unmuted " + count + " players.");
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("all"))
|
||||||
if (args[0].equalsIgnoreCase("all"))
|
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Muting all non-Superadmins", true);
|
TFM_Util.adminAction(sender.getName(), "Muting all non-Superadmins", true);
|
||||||
|
|
||||||
@ -82,9 +70,9 @@ public class Command_stfu extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
TFM_Util.playerMsg(sender, "Muted " + counter + " players.");
|
TFM_Util.playerMsg(sender, "Muted " + counter + " players.");
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Player p;
|
Player p;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -104,11 +92,19 @@ public class Command_stfu extends TFM_Command
|
|||||||
TFM_Util.playerMsg(sender, "Unmuted " + p.getName());
|
TFM_Util.playerMsg(sender, "Unmuted " + p.getName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!TFM_SuperadminList.isUserSuperadmin(p))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Muting " + p.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Muting " + p.getName(), true);
|
||||||
playerdata.setMuted(true);
|
playerdata.setMuted(true);
|
||||||
TFM_Util.playerMsg(sender, "Muted " + p.getName());
|
TFM_Util.playerMsg(sender, "Muted " + p.getName());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TFM_Util.playerMsg(sender, p.getName() + " is a superadmin, and can't be muted.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_stop extends TFM_Command
|
public class Command_stop extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
TFM_Util.bcastMsg("Server is going offline!", ChatColor.LIGHT_PURPLE);
|
TFM_Util.bcastMsg("Server is going offline!", ChatColor.LIGHT_PURPLE);
|
||||||
|
|
||||||
for (Player p : server.getOnlinePlayers())
|
for (Player p : server.getOnlinePlayers())
|
||||||
@ -23,11 +21,6 @@ public class Command_stop extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
server.shutdown();
|
server.shutdown();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_survival extends TFM_Command
|
public class Command_survival extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -21,12 +21,6 @@ public class Command_survival extends TFM_Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player p;
|
Player p;
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
|
@ -2,15 +2,14 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_tempban extends TFM_Command
|
public class Command_tempban extends TFM_Command
|
||||||
{
|
{
|
||||||
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
|
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
|
||||||
@ -23,12 +22,6 @@ public class Command_tempban extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player p;
|
Player p;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1,23 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_RunSystemCommand;
|
import me.StevenLawson.TotalFreedomMod.TFM_RunSystemCommand;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_terminal extends TFM_Command
|
public class Command_terminal extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
String command;
|
String command;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_tfbanlist extends TFM_Command
|
public class Command_tfbanlist extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_tfipbanlist extends TFM_Command
|
public class Command_tfipbanlist extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.ONLY_IN_GAME, ignore_permissions = false)
|
||||||
public class Command_tossmob extends TFM_Command
|
public class Command_tossmob extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -23,12 +24,6 @@ public class Command_tossmob extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (senderIsConsole)
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE);
|
|
||||||
}
|
|
||||||
else if (sender.isOp())
|
|
||||||
{
|
|
||||||
TFM_UserInfo playerData = TFM_UserInfo.getPlayerData(sender_p);
|
TFM_UserInfo playerData = TFM_UserInfo.getPlayerData(sender_p);
|
||||||
|
|
||||||
EntityType creature = EntityType.PIG;
|
EntityType creature = EntityType.PIG;
|
||||||
@ -86,11 +81,6 @@ public class Command_tossmob extends TFM_Command
|
|||||||
sender.sendMessage(ChatColor.GREEN + "Type '/tossmob off' to disable. -By Madgeek1450");
|
sender.sendMessage(ChatColor.GREEN + "Type '/tossmob off' to disable. -By Madgeek1450");
|
||||||
|
|
||||||
sender_p.setItemInHand(new ItemStack(Material.STICK, 1));
|
sender_p.setItemInHand(new ItemStack(Material.STICK, 1));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,29 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
//This command was coded initially by JeromSar
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
|
|
||||||
public class Command_uall extends TFM_Command
|
public class Command_uall extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Undisguising all players", true);
|
TFM_Util.adminAction(sender.getName(), "Undisguising all players", true);
|
||||||
try
|
|
||||||
|
if (senderIsConsole)
|
||||||
{
|
{
|
||||||
for (Player p : server.getOnlinePlayers())
|
for (Player p : Bukkit.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
server.dispatchCommand(p, "u");
|
server.dispatchCommand(p, "u");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable e)
|
else
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.GRAY + "Error sending command: " + e.getMessage());
|
server.dispatchCommand(sender, "u *");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -6,13 +6,13 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_waterplace extends TFM_Command
|
public class Command_waterplace extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
if (args.length != 1)
|
if (args.length != 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -28,11 +28,6 @@ public class Command_waterplace extends TFM_Command
|
|||||||
TotalFreedomMod.allowWaterPlace = false;
|
TotalFreedomMod.allowWaterPlace = false;
|
||||||
sender.sendMessage("Water placement is now disabled.");
|
sender.sendMessage("Water placement is now disabled.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.OP, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_whitelist extends TFM_Command
|
public class Command_whitelist extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -21,12 +22,6 @@ public class Command_whitelist extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sender.isOp())
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// list
|
// list
|
||||||
if (args[0].equalsIgnoreCase("list"))
|
if (args[0].equalsIgnoreCase("list"))
|
||||||
{
|
{
|
||||||
|
@ -1,19 +1,15 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, ignore_permissions = false)
|
||||||
public class Command_wildcard extends TFM_Command
|
public class Command_wildcard extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
{
|
||||||
if (args[0].equals("wildcard"))
|
if (args[0].equals("wildcard"))
|
||||||
{
|
{
|
||||||
@ -21,7 +17,7 @@ public class Command_wildcard extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String base_command = TFM_Util.implodeStringList(" ", Arrays.asList(args));
|
String base_command = StringUtils.join(args, " ");
|
||||||
|
|
||||||
for (Player p : server.getOnlinePlayers())
|
for (Player p : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
@ -29,11 +25,6 @@ public class Command_wildcard extends TFM_Command
|
|||||||
sender.sendMessage("Running Command: " + out_command);
|
sender.sendMessage("Running Command: " + out_command);
|
||||||
server.dispatchCommand(sender, out_command);
|
server.dispatchCommand(sender, out_command);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,17 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_wipeflatlands extends TFM_Command
|
public class Command_wipeflatlands extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(final CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(final CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!(senderIsConsole && TFM_SuperadminList.isSeniorAdmin(sender)))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFM_Util.setSavedFlag("do_wipe_flatlands", true);
|
TFM_Util.setSavedFlag("do_wipe_flatlands", true);
|
||||||
|
|
||||||
TFM_Util.bcastMsg("Server is going offline for flatlands wipe.", ChatColor.GRAY);
|
TFM_Util.bcastMsg("Server is going offline for flatlands wipe.", ChatColor.GRAY);
|
||||||
|
@ -4,22 +4,16 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_web_console = true, ignore_permissions = false)
|
||||||
public class Command_ziptool extends TFM_Command
|
public class Command_ziptool extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!senderIsConsole || TFM_Util.isFromClanforge(sender.getName()))
|
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length <= 1)
|
if (args.length <= 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
public enum SOURCE_TYPE_ALLOWED
|
||||||
|
{
|
||||||
|
ONLY_IN_GAME, ONLY_CONSOLE, BOTH
|
||||||
|
}
|
@ -2,6 +2,8 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
@ -31,6 +33,76 @@ public class TFM_Command
|
|||||||
this.server = plugin.getServer();
|
this.server = plugin.getServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean senderHasPermission(Class<?> cmd_class, CommandSender sender)
|
||||||
|
{
|
||||||
|
CommandPermissions permissions = cmd_class.getAnnotation(CommandPermissions.class);
|
||||||
|
if (permissions != null)
|
||||||
|
{
|
||||||
|
if (permissions.ignore_permissions())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
boolean is_super = TFM_SuperadminList.isUserSuperadmin(sender);
|
||||||
|
boolean is_senior = false;
|
||||||
|
if (is_super)
|
||||||
|
{
|
||||||
|
is_senior = TFM_SuperadminList.isSeniorAdmin(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
ADMIN_LEVEL level = permissions.level();
|
||||||
|
SOURCE_TYPE_ALLOWED source = permissions.source();
|
||||||
|
boolean block_web_console = permissions.block_web_console();
|
||||||
|
|
||||||
|
//TFM_Log.info("Level: " + level + ", Source: " + source + ", BWC: " + block_web_console);
|
||||||
|
|
||||||
|
Player sender_p = null;
|
||||||
|
if (sender instanceof Player)
|
||||||
|
{
|
||||||
|
sender_p = (Player) sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sender_p == null)
|
||||||
|
{
|
||||||
|
if (source == SOURCE_TYPE_ALLOWED.ONLY_IN_GAME)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_LEVEL.SENIOR && !is_senior)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (block_web_console && TFM_Util.isFromClanforge(sender.getName()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (source == SOURCE_TYPE_ALLOWED.ONLY_CONSOLE)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_LEVEL.SENIOR && !is_senior)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_LEVEL.SUPER && !is_super)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_LEVEL.OP && !sender_p.isOp())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public Player getPlayer(String partialname) throws CantFindPlayerException
|
public Player getPlayer(String partialname) throws CantFindPlayerException
|
||||||
{
|
{
|
||||||
List<Player> matches = server.matchPlayer(partialname);
|
List<Player> matches = server.matchPlayer(partialname);
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Listener;
|
package me.StevenLawson.TotalFreedomMod.Listener;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import me.StevenLawson.TotalFreedomMod.*;
|
import me.StevenLawson.TotalFreedomMod.*;
|
||||||
@ -9,7 +11,12 @@ import net.minecraft.server.BanEntry;
|
|||||||
import net.minecraft.server.BanList;
|
import net.minecraft.server.BanList;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.ServerConfigurationManagerAbstract;
|
import net.minecraft.server.ServerConfigurationManagerAbstract;
|
||||||
import org.bukkit.*;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Server;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -26,8 +33,7 @@ import org.bukkit.util.Vector;
|
|||||||
public class TFM_PlayerListener implements Listener
|
public class TFM_PlayerListener implements Listener
|
||||||
{
|
{
|
||||||
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
|
private static final SimpleDateFormat date_format = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
|
||||||
|
private static final List<String> BLOCKED_MUTED_CMDS = Arrays.asList(StringUtils.split("say,me,msg,m,tell,r,reply", ","));
|
||||||
private static final String[] MutedCommands = {"^/msg", "^/m","^/reply", "^/r", "^/tell", "^/me"};
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onPlayerInteract(PlayerInteractEvent event)
|
public void onPlayerInteract(PlayerInteractEvent event)
|
||||||
@ -95,18 +101,14 @@ public class TFM_PlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BLAZE_ROD:
|
case BLAZE_ROD:
|
||||||
{
|
{
|
||||||
if (TotalFreedomMod.allowExplosions && (
|
if (TotalFreedomMod.allowExplosions && TFM_SuperadminList.isSeniorAdmin(player))
|
||||||
player.getName().equals("Madgeek1450")
|
|
||||||
|| player.getName().equals("markbyron")
|
|
||||||
|| player.getName().equals("DarthSalamon")))
|
|
||||||
{
|
{
|
||||||
Block target_block = null;
|
Block target_block;
|
||||||
|
|
||||||
if (event.getAction().equals(Action.LEFT_CLICK_AIR))
|
if (event.getAction().equals(Action.LEFT_CLICK_AIR))
|
||||||
{
|
{
|
||||||
@ -128,7 +130,6 @@ public class TFM_PlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -476,6 +477,13 @@ public class TFM_PlayerListener implements Listener
|
|||||||
block_command = true;
|
block_command = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (Pattern.compile("^/e?socialspy").matcher(command).find())
|
||||||
|
{
|
||||||
|
if (!TFM_SuperadminList.isUserSuperadmin(p))
|
||||||
|
{
|
||||||
|
block_command = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (Pattern.compile("^/pardon").matcher(command).find())
|
else if (Pattern.compile("^/pardon").matcher(command).find())
|
||||||
{
|
{
|
||||||
block_command = true;
|
block_command = true;
|
||||||
@ -506,18 +514,24 @@ public class TFM_PlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
// block muted commands
|
// block muted commands
|
||||||
if(playerdata.isMuted())
|
|
||||||
{
|
{
|
||||||
for(String mc : MutedCommands)
|
if (!TFM_SuperadminList.isUserSuperadmin(p))
|
||||||
{
|
{
|
||||||
if (Pattern.compile(mc).matcher(command).find())
|
for (String test_command : BLOCKED_MUTED_CMDS)
|
||||||
{
|
{
|
||||||
p.sendMessage(ChatColor.RED + "You are muted, STFU!");
|
if (Pattern.compile("^/" + test_command.toLowerCase() + " ").matcher(command.toLowerCase()).find())
|
||||||
|
{
|
||||||
|
p.sendMessage(ChatColor.RED + "That command is blocked while you are muted.");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playerdata.setMuted(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
@ -698,33 +712,7 @@ public class TFM_PlayerListener implements Listener
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] test_ip_parts = test_ip.split("\\.");
|
if (TFM_Util.fuzzyIpMatch(test_ip, player_ip, 4))
|
||||||
String[] player_ip_parts = player_ip.split("\\.");
|
|
||||||
|
|
||||||
boolean is_match = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < test_ip_parts.length && i < player_ip_parts.length; i++)
|
|
||||||
{
|
|
||||||
if (test_ip_parts[i].equals("*") && i >= 2)
|
|
||||||
{
|
|
||||||
is_match = true;
|
|
||||||
}
|
|
||||||
else if (test_ip_parts[i].equals(player_ip_parts[i]))
|
|
||||||
{
|
|
||||||
is_match = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
is_match = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_match)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_match)
|
|
||||||
{
|
{
|
||||||
ban_entry = (BanEntry) banByIP.getEntries().get(test_ip);
|
ban_entry = (BanEntry) banByIP.getEntries().get(test_ip);
|
||||||
is_ip_banned = true;
|
is_ip_banned = true;
|
||||||
@ -759,9 +747,7 @@ public class TFM_PlayerListener implements Listener
|
|||||||
|
|
||||||
for (String test_ip : TotalFreedomMod.permbanned_ips)
|
for (String test_ip : TotalFreedomMod.permbanned_ips)
|
||||||
{
|
{
|
||||||
//TODO: Add support for wildcards in permbanned_ips list.
|
if (TFM_Util.fuzzyIpMatch(test_ip, player_ip, 4))
|
||||||
//TODO: Create generic wildcard IP matching method since we do this several times already in this project.
|
|
||||||
if (test_ip.equalsIgnoreCase(player_ip))
|
|
||||||
{
|
{
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, ChatColor.RED + "Your IP address is permanently banned from this server.");
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, ChatColor.RED + "Your IP address is permanently banned from this server.");
|
||||||
return;
|
return;
|
||||||
|
@ -264,25 +264,15 @@ public class TFM_SuperadminList
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String[] user_octets = user_ip.split("\\.");
|
|
||||||
if (user_octets.length != 4)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String match_ip = null;
|
String match_ip = null;
|
||||||
for (String test_ip : getSuperadminIPs())
|
for (String test_ip : getSuperadminIPs())
|
||||||
{
|
{
|
||||||
String[] test_octets = test_ip.split("\\.");
|
if (TFM_Util.fuzzyIpMatch(user_ip, test_ip, 3))
|
||||||
if (test_octets.length == 4)
|
|
||||||
{
|
|
||||||
if (user_octets[0].equals(test_octets[0]) && user_octets[1].equals(test_octets[1]) && user_octets[2].equals(test_octets[2]))
|
|
||||||
{
|
{
|
||||||
match_ip = test_ip;
|
match_ip = test_ip;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (match_ip != null)
|
if (match_ip != null)
|
||||||
{
|
{
|
||||||
@ -326,6 +316,8 @@ public class TFM_SuperadminList
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void addSuperadmin(String admin_name, List<String> ips)
|
public static void addSuperadmin(String admin_name, List<String> ips)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
admin_name = admin_name.toLowerCase();
|
admin_name = admin_name.toLowerCase();
|
||||||
|
|
||||||
@ -349,6 +341,11 @@ public class TFM_SuperadminList
|
|||||||
|
|
||||||
saveSuperadminList();
|
saveSuperadminList();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TFM_Log.severe(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void addSuperadmin(Player p)
|
public static void addSuperadmin(Player p)
|
||||||
{
|
{
|
||||||
@ -364,6 +361,8 @@ public class TFM_SuperadminList
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void removeSuperadmin(String admin_name)
|
public static void removeSuperadmin(String admin_name)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
admin_name = admin_name.toLowerCase();
|
admin_name = admin_name.toLowerCase();
|
||||||
|
|
||||||
@ -374,6 +373,11 @@ public class TFM_SuperadminList
|
|||||||
saveSuperadminList();
|
saveSuperadminList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TFM_Log.severe(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void removeSuperadmin(Player p)
|
public static void removeSuperadmin(Player p)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ public class TFM_Util
|
|||||||
private static final Map<String, Integer> eject_tracker = new HashMap<String, Integer>();
|
private static final Map<String, Integer> eject_tracker = new HashMap<String, Integer>();
|
||||||
public static final Map<String, EntityType> mobtypes = new HashMap<String, EntityType>();
|
public static final Map<String, EntityType> mobtypes = new HashMap<String, EntityType>();
|
||||||
public static final List<String> stop_commands = Arrays.asList("stop", "off", "end", "halt", "die");
|
public static final List<String> stop_commands = Arrays.asList("stop", "off", "end", "halt", "die");
|
||||||
public static final List<String> restricted_senders = Arrays.asList("rcon, remotebukkit");
|
public static final List<String> restricted_senders = Arrays.asList("rcon", "remotebukkit");
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
@ -83,6 +83,7 @@ public class TFM_Util
|
|||||||
TFM_Util.bcastMsg(adminName + " - " + action, (isRed ? ChatColor.RED : ChatColor.AQUA));
|
TFM_Util.bcastMsg(adminName + " - " + action, (isRed ? ChatColor.RED : ChatColor.AQUA));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static String implodeStringList(String glue, List<String> pieces)
|
public static String implodeStringList(String glue, List<String> pieces)
|
||||||
{
|
{
|
||||||
return StringUtils.join(pieces, glue);
|
return StringUtils.join(pieces, glue);
|
||||||
@ -884,7 +885,6 @@ public class TFM_Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
||||||
|
|
||||||
public static String dateToString(Date date)
|
public static String dateToString(Date date)
|
||||||
@ -909,13 +909,55 @@ public class TFM_Util
|
|||||||
return restricted_senders.contains(sender_name.toLowerCase());
|
return restricted_senders.contains(sender_name.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> removeDuplicates(List<String> list)
|
public static List<String> removeDuplicates(List<String> old_list)
|
||||||
{
|
{
|
||||||
HashSet<String> hash = new HashSet<String>();
|
List<String> new_list = new ArrayList<String>();
|
||||||
hash.addAll(list);
|
for (String entry : old_list)
|
||||||
list.clear();
|
{
|
||||||
list.addAll(hash);
|
if (!new_list.contains(entry))
|
||||||
return list;
|
{
|
||||||
|
new_list.add(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean fuzzyIpMatch(String a, String b, int required_octets)
|
||||||
|
{
|
||||||
|
boolean is_match = true;
|
||||||
|
|
||||||
|
String[] a_parts = StringUtils.split(a, '.');
|
||||||
|
String[] b_parts = StringUtils.split(b, '.');
|
||||||
|
|
||||||
|
if (a_parts.length != 4 || b_parts.length != 4)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (required_octets > 4)
|
||||||
|
{
|
||||||
|
required_octets = 4;
|
||||||
|
}
|
||||||
|
else if (required_octets < 1)
|
||||||
|
{
|
||||||
|
required_octets = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < required_octets && i < 4; i++)
|
||||||
|
{
|
||||||
|
if (a_parts[i].equals("*") || b_parts[i].equals("*"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!a_parts[i].equals(b_parts[i]))
|
||||||
|
{
|
||||||
|
is_match = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return is_match;
|
||||||
}
|
}
|
||||||
// I wrote all this before i discovered getTargetBlock >.> - might come in handy some day...
|
// I wrote all this before i discovered getTargetBlock >.> - might come in handy some day...
|
||||||
// public static final double LOOKAT_VIEW_HEIGHT = 1.65;
|
// public static final double LOOKAT_VIEW_HEIGHT = 1.65;
|
||||||
|
@ -8,6 +8,7 @@ import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener;
|
|||||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
|
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
|
||||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_PlayerListener;
|
import me.StevenLawson.TotalFreedomMod.Listener.TFM_PlayerListener;
|
||||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_WeatherListener;
|
import me.StevenLawson.TotalFreedomMod.Listener.TFM_WeatherListener;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -122,7 +123,7 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
sender_p.getName(),
|
sender_p.getName(),
|
||||||
ChatColor.stripColor(sender_p.getDisplayName()),
|
ChatColor.stripColor(sender_p.getDisplayName()),
|
||||||
commandLabel,
|
commandLabel,
|
||||||
TFM_Util.implodeStringList(" ", Arrays.asList(args))), true);
|
StringUtils.join(args, " ")), true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -130,7 +131,7 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
TFM_Log.info(String.format("[CONSOLE_COMMAND] %s: /%s %s",
|
TFM_Log.info(String.format("[CONSOLE_COMMAND] %s: /%s %s",
|
||||||
sender.getName(),
|
sender.getName(),
|
||||||
commandLabel,
|
commandLabel,
|
||||||
TFM_Util.implodeStringList(" ", Arrays.asList(args))), true);
|
StringUtils.join(args, " ")), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TFM_Command dispatcher;
|
TFM_Command dispatcher;
|
||||||
@ -148,9 +149,16 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (dispatcher.senderHasPermission(dispatcher.getClass(), sender))
|
||||||
{
|
{
|
||||||
return dispatcher.run(sender, sender_p, cmd, commandLabel, args, senderIsConsole);
|
return dispatcher.run(sender, sender_p, cmd, commandLabel, args, senderIsConsole);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Throwable ex)
|
catch (Throwable ex)
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.RED + "Command Error: " + ex.getMessage());
|
sender.sendMessage(ChatColor.RED + "Command Error: " + ex.getMessage());
|
||||||
|
@ -34,6 +34,9 @@ commands:
|
|||||||
deopall:
|
deopall:
|
||||||
description: Superadmin command - Deop everyone on the server.
|
description: Superadmin command - Deop everyone on the server.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
|
dispfill:
|
||||||
|
description: Fill nearby dispensers with a set of items of your choice.
|
||||||
|
usage: /<command> <radius> <comma,separated,items>
|
||||||
doom:
|
doom:
|
||||||
description: Owner command - For the bad Superadmins.
|
description: Owner command - For the bad Superadmins.
|
||||||
usage: /<command> <playername>
|
usage: /<command> <playername>
|
||||||
|
@ -19,7 +19,7 @@ superadmins:
|
|||||||
is_senior_admin: true
|
is_senior_admin: true
|
||||||
console_aliases:
|
console_aliases:
|
||||||
- madgeek
|
- madgeek
|
||||||
is_activated: false
|
is_activated: true
|
||||||
markbyron:
|
markbyron:
|
||||||
ips:
|
ips:
|
||||||
- 74.125.224.72
|
- 74.125.224.72
|
||||||
|
Loading…
Reference in New Issue
Block a user