diff --git a/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java index 3e54530..a4cafda 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java +++ b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java @@ -156,7 +156,6 @@ public class TFM_WorldEditBridge }.runTask(TotalFreedomMod.plugin); } - } catch (IncompleteRegionException ex) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java index 3ad09a3..e23dfa0 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.World.TFM_AdminWorld; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -117,7 +116,7 @@ public class Command_adminworld extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } @@ -216,7 +215,7 @@ public class Command_adminworld extends TFM_Command { if (!(sender instanceof Player) || sender_p == null || !TFM_AdminList.isSuperAdmin(sender)) { - throw new PermissionDeniedException(TotalFreedomMod.MSG_NO_PERMS); + throw new PermissionDeniedException(TFM_Command.MSG_NO_PERMS); } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_blockcmd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_blockcmd.java index c4f3b59..1c91060 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_blockcmd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_blockcmd.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -41,7 +40,7 @@ public class Command_blockcmd extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java index dd97743..81bf2fb 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; @@ -52,7 +51,7 @@ public class Command_cage extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cartsit.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cartsit.java index 031584e..9150d72 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cartsit.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cartsit.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Minecart; @@ -23,7 +22,7 @@ public class Command_cartsit extends TFM_Command if (targetPlayer == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java index 479fbaf..5f4ba3c 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cmdlist.java @@ -48,4 +48,4 @@ public class Command_cmdlist extends TFM_Command return true; } -} \ No newline at end of file +} diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java index a702ee4..79e3bd1 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -35,7 +34,7 @@ public class Command_creative extends TFM_Command { if (!TFM_AdminList.isSuperAdmin(sender)) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } @@ -54,12 +53,11 @@ public class Command_creative extends TFM_Command return true; } - player = getPlayer(args[0]); if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java index 738b79e..cd58822 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -18,7 +17,7 @@ public class Command_deopall extends TFM_Command for (Player player : server.getOnlinePlayers()) { player.setOp(false); - player.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); + player.sendMessage(TFM_Command.YOU_ARE_NOT_OP); } return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java index fe8b06c..5d8eb1f 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java @@ -5,8 +5,6 @@ import me.StevenLawson.TotalFreedomMod.TFM_Ban; import me.StevenLawson.TotalFreedomMod.TFM_BanManager; import me.StevenLawson.TotalFreedomMod.TFM_PlayerList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TFM_UuidResolver; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -31,7 +29,7 @@ public class Command_doom extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ender.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ender.java index 675313b..4200632 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ender.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ender.java @@ -5,14 +5,14 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.ALL, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Goto the ender / \"The End\".", usage = "/") public class Command_ender extends TFM_Command { @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - TFM_Util.gotoWorld(sender, server.getWorlds().get(0).getName() + "_the_end"); + TFM_Util.gotoWorld(sender_p, server.getWorlds().get(0).getName() + "_the_end"); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_findip.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_findip.java index 08a322b..7330866 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_findip.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_findip.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerList; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -24,7 +23,7 @@ public class Command_findip extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java index 41b51a3..12b4620 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java @@ -85,7 +85,7 @@ public class Command_fr extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java index 189064a..17bb6b1 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java @@ -5,7 +5,6 @@ import java.util.Iterator; import me.StevenLawson.TotalFreedomMod.TFM_BanManager; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -165,7 +164,7 @@ public class Command_gadmin extends TFM_Command { TFM_Util.adminAction(sender.getName(), String.format("Opping %s.", target.getName()), false); target.setOp(false); - target.sendMessage(TotalFreedomMod.YOU_ARE_OP); + target.sendMessage(TFM_Command.YOU_ARE_OP); break; } @@ -173,7 +172,7 @@ public class Command_gadmin extends TFM_Command { TFM_Util.adminAction(sender.getName(), String.format("Deopping %s.", target.getName()), false); target.setOp(false); - target.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); + target.sendMessage(TFM_Command.YOU_ARE_NOT_OP); break; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java index 3824c4d..48aa102 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_CommandBlocker; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -23,7 +22,7 @@ public class Command_gcmd extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java index 85f9885..cfaff76 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java @@ -5,7 +5,6 @@ import me.StevenLawson.TotalFreedomMod.TFM_Ban; import me.StevenLawson.TotalFreedomMod.TFM_BanManager; import me.StevenLawson.TotalFreedomMod.TFM_RollbackManager; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.ArrayUtils; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; @@ -31,7 +30,7 @@ public class Command_gtfo extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_halt.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_halt.java index 2a5dd54..4fb0ef1 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_halt.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_halt.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -81,7 +80,7 @@ public class Command_halt extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lastcmd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lastcmd.java index b83b0db..564179b 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lastcmd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lastcmd.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -23,7 +22,7 @@ public class Command_lastcmd extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java index 170cca2..e1b599a 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -51,7 +50,7 @@ public class Command_lockup extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } @@ -65,7 +64,7 @@ public class Command_lockup extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nether.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nether.java index 50edd47..0a0ad5d 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nether.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nether.java @@ -5,14 +5,14 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.ALL, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Goto the nether.", usage = "/") public class Command_nether extends TFM_Command { @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - TFM_Util.gotoWorld(sender, server.getWorlds().get(0).getName() + "_nether"); + TFM_Util.gotoWorld(sender_p, server.getWorlds().get(0).getName() + "_nether"); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_onlinemode.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_onlinemode.java index 33c8e6e..feb1def 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_onlinemode.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_onlinemode.java @@ -4,7 +4,6 @@ import me.StevenLawson.TotalFreedomMod.TFM_Log; import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -28,7 +27,7 @@ public class Command_onlinemode extends TFM_Command if (sender instanceof Player && !TFM_AdminList.isSeniorAdmin(sender, true)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opall.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opall.java index b1da456..9c68a12 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opall.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opall.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -35,7 +34,7 @@ public class Command_opall extends TFM_Command for (Player player : server.getOnlinePlayers()) { player.setOp(true); - player.sendMessage(TotalFreedomMod.YOU_ARE_OP); + player.sendMessage(TFM_Command.YOU_ARE_OP); if (doSetGamemode) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opme.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opme.java index c4c8bad..00839a6 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opme.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_opme.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -15,7 +14,7 @@ public class Command_opme extends TFM_Command { TFM_Util.adminAction(sender.getName(), "Opping " + sender.getName(), false); sender.setOp(true); - sender.sendMessage(TotalFreedomMod.YOU_ARE_OP); + sender.sendMessage(TFM_Command.YOU_ARE_OP); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ops.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ops.java index b10dd47..959da28 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ops.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ops.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -44,7 +43,7 @@ public class Command_ops extends TFM_Command { if (!TFM_AdminList.isSuperAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } @@ -55,7 +54,7 @@ public class Command_ops extends TFM_Command player.setOp(false); if (player.isOnline()) { - playerMsg(player.getPlayer(), TotalFreedomMod.YOU_ARE_NOT_OP); + playerMsg(player.getPlayer(), TFM_Command.YOU_ARE_NOT_OP); } } return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java index 9e8ad5a..c149958 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -27,7 +26,7 @@ public class Command_orbit extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java index ee49140..580de41 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PermbanList; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -28,7 +27,7 @@ public class Command_permban extends TFM_Command { if (!senderIsConsole) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } playerMsg("Reloading permban list...", ChatColor.RED); diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java index e97fc2a..63814e3 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -40,7 +39,7 @@ public class Command_potion extends TFM_Command { if (!(TFM_AdminList.isSuperAdmin(sender) || senderIsConsole)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } TFM_Util.adminAction(sender.getName(), "Cleared all potion effects from all players", true); @@ -62,7 +61,7 @@ public class Command_potion extends TFM_Command if (target == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } } @@ -106,7 +105,7 @@ public class Command_potion extends TFM_Command if (target == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java index 9e7452b..a868b57 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.util.ArrayList; import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -38,7 +37,7 @@ public class Command_qdeop extends TFM_Command { matchedPlayerNames.add(player.getName()); player.setOp(false); - player.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); + player.sendMessage(TFM_Command.YOU_ARE_NOT_OP); } } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qop.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qop.java index 44fa815..b24597d 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qop.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qop.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.util.ArrayList; import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -38,7 +37,7 @@ public class Command_qop extends TFM_Command { matchedPlayerNames.add(player.getName()); player.setOp(true); - player.sendMessage(TotalFreedomMod.YOU_ARE_OP); + player.sendMessage(TFM_Command.YOU_ARE_OP); } } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java index d7121af..af76f43 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_PlayerRank; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -38,11 +37,10 @@ public class Command_rank extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } - playerMsg(player.getName() + " is " + TFM_PlayerRank.fromSender(player).getLoginMessage(), ChatColor.AQUA); return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ro.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ro.java index cb0a371..e8196eb 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ro.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_ro.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.util.ArrayList; import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -71,7 +70,7 @@ public class Command_ro extends TFM_Command targetPlayer = getPlayer(args[2]); if (targetPlayer == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rollback.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rollback.java index a25e072..838b9b4 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rollback.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rollback.java @@ -85,7 +85,6 @@ public class Command_rollback extends TFM_Command { String playerName = null; - final Player player = getPlayer(playerNameInput); if (player != null) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java index 0f9d662..429baea 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java @@ -6,7 +6,6 @@ import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_TwitterHandler; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; @@ -39,7 +38,7 @@ public class Command_saconfig extends TFM_Command { if (!TFM_AdminList.isSeniorAdmin(sender, true)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } @@ -53,7 +52,7 @@ public class Command_saconfig extends TFM_Command // All commands below are superadmin+ commands. if (!TFM_AdminList.isSuperAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } @@ -61,7 +60,7 @@ public class Command_saconfig extends TFM_Command { if (senderIsConsole) { - playerMsg(TotalFreedomMod.NOT_FROM_CONSOLE); + playerMsg(TFM_Command.NOT_FROM_CONSOLE); return true; } @@ -157,7 +156,7 @@ public class Command_saconfig extends TFM_Command if (superadmin == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } @@ -185,7 +184,7 @@ public class Command_saconfig extends TFM_Command { if (!TFM_AdminList.isSeniorAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_smite.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_smite.java index d891fa0..58e873e 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_smite.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_smite.java @@ -1,7 +1,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Location; @@ -26,7 +25,7 @@ public class Command_smite extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stfu.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stfu.java index 787a60a..2e814d4 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stfu.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stfu.java @@ -102,7 +102,7 @@ public class Command_stfu extends TFM_Command if (player == null) { - sender.sendMessage(TotalFreedomMod.PLAYER_NOT_FOUND); + sender.sendMessage(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java index e4c177c..bb3cdf1 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java @@ -2,7 +2,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -36,7 +35,7 @@ public class Command_survival extends TFM_Command { if (!TFM_AdminList.isSuperAdmin(sender) || senderIsConsole) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } @@ -55,7 +54,7 @@ public class Command_survival extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tag.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tag.java index 3262b22..591f091 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tag.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tag.java @@ -5,7 +5,6 @@ import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -45,7 +44,7 @@ public class Command_tag extends TFM_Command { if (!TFM_AdminList.isSuperAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } @@ -91,7 +90,7 @@ public class Command_tag extends TFM_Command { if (!TFM_AdminList.isSuperAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } @@ -99,7 +98,7 @@ public class Command_tag extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java index 6e18404..2309751 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java @@ -2,9 +2,7 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Ban; import me.StevenLawson.TotalFreedomMod.TFM_BanManager; -import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.Command; @@ -27,11 +25,10 @@ public class Command_tban extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND, ChatColor.RED); + playerMsg(TFM_Command.PLAYER_NOT_FOUND, ChatColor.RED); return true; } - // strike with lightning effect: final Location targetPos = player.getLocation(); for (int x = -1; x <= 1; x++) diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tempban.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tempban.java index 2aa6fb0..c65d953 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tempban.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tempban.java @@ -31,7 +31,7 @@ public class Command_tempban extends TFM_Command if (player == null) { - playerMsg(TotalFreedomMod.PLAYER_NOT_FOUND); + playerMsg(TFM_Command.PLAYER_NOT_FOUND); return true; } @@ -55,7 +55,6 @@ public class Command_tempban extends TFM_Command message.append(", Reason: \"").append(reason).append("\""); } - // strike with lightning effect: final Location targetPos = player.getLocation(); for (int x = -1; x <= 1; x++) @@ -72,7 +71,6 @@ public class Command_tempban extends TFM_Command TFM_BanManager.addIpBan(new TFM_Ban(TFM_Util.getIp(player), player.getName(), sender.getName(), expires, reason)); TFM_BanManager.addUuidBan(new TFM_Ban(TFM_Util.getUuid(player), player.getName(), sender.getName(), expires, reason)); - player.kickPlayer(sender.getName() + " - " + message.toString()); return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfm.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfm.java index 57ecd81..9c18e69 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfm.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfm.java @@ -33,7 +33,7 @@ public class Command_tfm extends TFM_Command if (!TFM_AdminList.isSuperAdmin(sender)) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfupdate.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfupdate.java index 5395f4d..a18e33c 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfupdate.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tfupdate.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.io.File; import me.StevenLawson.TotalFreedomMod.TFM_Log; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -28,7 +27,7 @@ public class Command_tfupdate extends TFM_Command if (!sender.getName().equalsIgnoreCase("madgeek1450")) { - playerMsg(TotalFreedomMod.MSG_NO_PERMS); + playerMsg(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_twitter.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_twitter.java index 11c9e5e..4a95f06 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_twitter.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_twitter.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry; import me.StevenLawson.TotalFreedomMod.TFM_TwitterHandler; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -113,7 +112,7 @@ public class Command_twitter extends TFM_Command { if (!sender.getName().equalsIgnoreCase("DarthSalamon")) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_uuid.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_uuid.java index 9e6cc08..67af436 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_uuid.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_uuid.java @@ -109,7 +109,6 @@ public class Command_uuid extends TFM_Command } - return false; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_whitelist.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_whitelist.java index 18588d5..a878cc2 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_whitelist.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_whitelist.java @@ -3,7 +3,6 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface; import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_Util; -import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -58,7 +57,7 @@ public class Command_whitelist extends TFM_Command // all commands past this line are superadmin-only if (!(senderIsConsole || TFM_AdminList.isSuperAdmin(sender))) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } @@ -152,7 +151,7 @@ public class Command_whitelist extends TFM_Command // all commands past this line are console/telnet only if (!senderIsConsole) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java index 6f19abb..90f73ba 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java @@ -13,6 +13,12 @@ import org.bukkit.entity.Player; public abstract class TFM_Command { + public static final String MSG_NO_PERMS = ChatColor.YELLOW + "You do not have permission to use this command."; + public static final String YOU_ARE_OP = ChatColor.YELLOW + "You are now op!"; + public static final String YOU_ARE_NOT_OP = ChatColor.YELLOW + "You are no longer op!"; + public static final String NOT_FROM_CONSOLE = "This command may not be used from the console."; + public static final String PLAYER_NOT_FOUND = ChatColor.GRAY + "Player not found!"; + protected TotalFreedomMod plugin; protected Server server; private CommandSender commandSender; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_CommandHandler.java b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_CommandHandler.java index ef8bb88..c65be27 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_CommandHandler.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_CommandHandler.java @@ -40,7 +40,6 @@ public class TFM_CommandHandler StringUtils.join(args, " ")), true); } - final TFM_Command dispatcher; try { @@ -62,7 +61,7 @@ public class TFM_CommandHandler if (!dispatcher.senderHasPermission()) { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + sender.sendMessage(TFM_Command.MSG_NO_PERMS); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java b/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java index 1383b2a..c04d50c 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java @@ -1,6 +1,5 @@ package me.StevenLawson.TotalFreedomMod; -import java.io.File; import java.util.Collections; import java.util.Date; import java.util.HashMap; @@ -22,7 +21,6 @@ import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Player; -import org.bukkit.util.FileUtil; public class TFM_AdminList { @@ -136,7 +134,6 @@ public class TFM_AdminList admin.isSeniorAdmin(), admin.isActivated()); - newAdmin.addIps(admin.getIps()); adminList.remove(oldUuid); @@ -222,7 +219,6 @@ public class TFM_AdminList telnetUUIDs.add(uuid); } - if (admin.isSeniorAdmin()) { seniorUUIDs.add(uuid); @@ -413,7 +409,6 @@ public class TFM_AdminList } } - if (!(sender instanceof Player)) { return seniorConsoleNames.contains(sender.getName()) @@ -443,7 +438,6 @@ public class TFM_AdminList return true; } - if (superIps.contains(TFM_Util.getIp(player))) { return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java index 5906120..7afbce7 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java @@ -31,8 +31,8 @@ public class TFM_Heartbeat extends BukkitRunnable { lastRan = System.currentTimeMillis(); - final boolean doAwayKickCheck = - TFM_ConfigEntry.AUTOKICK_ENABLED.getBoolean() + final boolean doAwayKickCheck + = TFM_ConfigEntry.AUTOKICK_ENABLED.getBoolean() && TFM_EssentialsBridge.isEssentialsEnabled() && ((server.getOnlinePlayers().length / server.getMaxPlayers()) > TFM_ConfigEntry.AUTOKICK_THRESHOLD.getDouble()); diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_PlayerRank.java b/src/me/StevenLawson/TotalFreedomMod/TFM_PlayerRank.java index b435f4b..0c2b016 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_PlayerRank.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_PlayerRank.java @@ -70,7 +70,6 @@ public enum TFM_PlayerRank return DEVELOPER; } - final TFM_Admin entry = TFM_AdminList.getEntry((Player) sender); final TFM_PlayerRank rank; diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java index fa67f1b..ce05f28 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java @@ -1,7 +1,14 @@ package me.StevenLawson.TotalFreedomMod; -import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry; -import java.io.*; +import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; import java.lang.reflect.Field; import java.net.URL; import java.nio.channels.Channels; @@ -10,12 +17,24 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Random; +import java.util.Set; +import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; import me.StevenLawson.TotalFreedomMod.Config.TFM_Config; +import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry; import net.minecraft.util.org.apache.commons.io.FileUtils; - import net.minecraft.util.org.apache.commons.lang3.StringUtils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -260,35 +279,31 @@ public class TFM_Util return escapedIp.trim().replaceAll("_", "\\."); } - public static void gotoWorld(CommandSender sender, String targetworld) + public static void gotoWorld(Player player, String targetWorld) { - if (sender instanceof Player) + if (player == null) { - Player player = (Player) sender; + return; + } - if (player.getWorld().getName().equalsIgnoreCase(targetworld)) + if (player.getWorld().getName().equalsIgnoreCase(targetWorld)) + { + playerMsg(player, "Going to main world.", ChatColor.GRAY); + player.teleport(Bukkit.getWorlds().get(0).getSpawnLocation()); + return; + } + + for (World world : Bukkit.getWorlds()) + { + if (world.getName().equalsIgnoreCase(targetWorld)) { - sender.sendMessage(ChatColor.GRAY + "Going to main world."); - player.teleport(Bukkit.getWorlds().get(0).getSpawnLocation()); + playerMsg(player, "Going to world: " + targetWorld, ChatColor.GRAY); + player.teleport(world.getSpawnLocation()); return; } - - for (World world : Bukkit.getWorlds()) - { - if (world.getName().equalsIgnoreCase(targetworld)) - { - sender.sendMessage(ChatColor.GRAY + "Going to world: " + targetworld); - player.teleport(world.getSpawnLocation()); - return; - } - } - - sender.sendMessage(ChatColor.GRAY + "World " + targetworld + " not found."); - } - else - { - sender.sendMessage(TotalFreedomMod.NOT_FROM_CONSOLE); } + + playerMsg(player, "World " + targetWorld + " not found.", ChatColor.GRAY); } public static String decolorize(String string) diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java index 969be61..abaad0e 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java +++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java @@ -14,7 +14,6 @@ import java.util.Properties; import me.StevenLawson.TotalFreedomMod.Commands.TFM_CommandLoader; import me.StevenLawson.TotalFreedomMod.HTTPD.TFM_HTTPD_Manager; import me.StevenLawson.TotalFreedomMod.Listener.*; -import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.World; import org.bukkit.command.Command; @@ -36,12 +35,6 @@ public class TotalFreedomMod extends JavaPlugin public static final String PROTECTED_AREA_FILE = "protectedareas.dat"; public static final String SAVED_FLAGS_FILE = "savedflags.dat"; // - public static final String MSG_NO_PERMS = ChatColor.YELLOW + "You do not have permission to use this command."; - public static final String YOU_ARE_OP = ChatColor.YELLOW + "You are now op!"; - public static final String YOU_ARE_NOT_OP = ChatColor.YELLOW + "You are no longer op!"; - public static final String NOT_FROM_CONSOLE = "This command may not be used from the console."; - public static final String PLAYER_NOT_FOUND = ChatColor.GRAY + "Player not found!"; - // public static String buildNumber = "1"; public static String buildDate = TotalFreedomMod.buildDate = TFM_Util.dateToString(new Date()); public static String buildCreator = "Unknown"; diff --git a/src/me/StevenLawson/TotalFreedomMod/World/CleanroomBlockPopulator.java b/src/me/StevenLawson/TotalFreedomMod/World/CleanroomBlockPopulator.java index eec31a1..d31f181 100644 --- a/src/me/StevenLawson/TotalFreedomMod/World/CleanroomBlockPopulator.java +++ b/src/me/StevenLawson/TotalFreedomMod/World/CleanroomBlockPopulator.java @@ -56,4 +56,4 @@ public class CleanroomBlockPopulator extends BlockPopulator } } } -} \ No newline at end of file +} diff --git a/src/me/StevenLawson/TotalFreedomMod/World/CleanroomChunkGenerator.java b/src/me/StevenLawson/TotalFreedomMod/World/CleanroomChunkGenerator.java index 1eaabac..8cbcbc9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/World/CleanroomChunkGenerator.java +++ b/src/me/StevenLawson/TotalFreedomMod/World/CleanroomChunkGenerator.java @@ -233,4 +233,4 @@ public class CleanroomChunkGenerator extends ChunkGenerator return new Location(world, 0, world.getHighestBlockYAt(0, 0), 0); } -} \ No newline at end of file +}