diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java index 3bf3cf2..3040535 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java @@ -43,6 +43,7 @@ public class Command_cage extends TFM_Command { if (TFM_Util.isStopCommand(args[1])) { + TFM_Util.adminAction(sender.getName(), "Uncaging " + p.getName(), true); playerdata.setCaged(false); playerdata.regenerateHistory(); playerdata.clearHistory(); @@ -80,8 +81,7 @@ public class Command_cage extends TFM_Command TFM_Util.generateCube(target_pos, 1, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.INNER)); p.setGameMode(GameMode.SURVIVAL); - - TFM_Util.bcastMsg(sender.getName() + " caged " + p.getName() + "!", ChatColor.YELLOW); + TFM_Util.adminAction(sender.getName(), "Caging " + p.getName(), true); } else { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java index 39254b5..451bf3f 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java @@ -17,13 +17,7 @@ public class Command_fuckoff extends TFM_Command return true; } - if (!TFM_SuperadminList.isUserSuperadmin(sender)) - { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); - return true; - } - - if (!TFM_SuperadminList.isSeniorAdmin(sender_p)) + if (!(TFM_SuperadminList.isUserSuperadmin(sender) || !TFM_SuperadminList.isSeniorAdmin(sender_p))) { sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java index d94c57b..579ffaf 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java @@ -34,7 +34,6 @@ public class Command_gadmin extends TFM_Command if (mode.equals("list")) { sender.sendMessage(ChatColor.GRAY + String.format("[ %s ] : [ %s ] - %s", - p.getName(), ChatColor.stripColor(p.getDisplayName()), hash)); } @@ -42,13 +41,14 @@ public class Command_gadmin extends TFM_Command { if (mode.equals("kick")) { + TFM_Util.adminAction(sender.getName(), "Kicking " + p.getName(), true); p.kickPlayer("Kicked by Administrator"); } else if (mode.equals("nameban")) { //server.getOfflinePlayer(p.getName()).setBanned(true); TFM_Util.banUsername(p.getName(), null, null, null); - TFM_Util.bcastMsg(String.format("Banning Name: %s.", p.getName()), ChatColor.RED); + TFM_Util.adminAction(sender.getName(), "Banning name: " + p.getName(), true); p.kickPlayer("Username banned by Administrator."); } else if (mode.equals("ipban")) @@ -59,7 +59,7 @@ public class Command_gadmin extends TFM_Command { user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]); } - TFM_Util.bcastMsg(String.format("Banning IP: %s.", p.getName(), user_ip), ChatColor.RED); + TFM_Util.adminAction(sender.getName(), "Banning name: " + p.getName(), true); //server.banIP(user_ip); TFM_Util.banIP(user_ip, null, null, null); p.kickPlayer("IP address banned by Administrator."); @@ -72,8 +72,7 @@ public class Command_gadmin extends TFM_Command { user_ip = String.format("%s.%s.*.*", ip_parts[0], ip_parts[1]); } - TFM_Util.bcastMsg(String.format("Banning Name: %s, IP: %s.", p.getName(), user_ip), ChatColor.RED); - //server.banIP(user_ip); + TFM_Util.adminAction(sender.getName(), "Banning " + p.getName() + ", IP " + user_ip, true); //server.getOfflinePlayer(p.getName()).setBanned(true); TFM_Util.banIP(user_ip, null, null, null); TFM_Util.banUsername(p.getName(), null, null, null); @@ -81,13 +80,13 @@ public class Command_gadmin extends TFM_Command } else if (mode.equals("op")) { - TFM_Util.bcastMsg(String.format("(%s: Opping %s)", sender.getName(), p.getName()), ChatColor.GRAY); + TFM_Util.adminAction(sender.getName(), "Opping " + p.getName(), false); p.setOp(false); p.sendMessage(TotalFreedomMod.YOU_ARE_OP); } else if (mode.equals("deop")) { - TFM_Util.bcastMsg(String.format("(%s: De-opping %s)", sender.getName(), p.getName()), ChatColor.GRAY); + TFM_Util.adminAction(sender.getName(), "De-opping " + p.getName(), false); p.setOp(false); p.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); } @@ -100,7 +99,7 @@ public class Command_gadmin extends TFM_Command TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p); playerdata.setFrozen(!playerdata.isFrozen()); - sender.sendMessage(ChatColor.AQUA + p.getName() + " has been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + "."); + TFM_Util.adminAction(sender.getName(), "Freezing " + p.getName(), false); p.sendMessage(ChatColor.AQUA + "You have been " + (playerdata.isFrozen() ? "frozen" : "unfrozen") + "."); } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_list.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_list.java index 671d647..ec3215c 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_list.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_list.java @@ -33,13 +33,13 @@ public class Command_list extends TFM_Command { if (TFM_SuperadminList.isUserSuperadmin(p)) { - if (p.isOp()) + if(TFM_SuperadminList.isSeniorAdmin(p)) { - prefix = (ChatColor.GOLD + "[SA+OP]"); + prefix = (ChatColor.GOLD + "[SenAdmin]"); } else { - prefix = (ChatColor.GOLD + "[SA]"); + prefix = (ChatColor.RED + "[SupAdmin]"); } } else diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java index f713919..59c0bbb 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java @@ -4,7 +4,6 @@ import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList; import me.StevenLawson.TotalFreedomMod.TFM_UserInfo; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; -import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -42,7 +41,7 @@ public class Command_orbit extends TFM_Command { if (TFM_Util.isStopCommand(args[1])) { - sender.sendMessage(ChatColor.GRAY + "Stopped orbiting " + p.getName()); + TFM_Util.adminAction(sender.getName(), "Stopping " + p.getName() + "'s Orbit", true); playerdata.stopOrbiting(); return true; } @@ -61,7 +60,7 @@ public class Command_orbit extends TFM_Command p.setVelocity(new Vector(0, strength, 0)); - sender.sendMessage(ChatColor.GRAY + "Orbiting " + p.getName()); + TFM_Util.adminAction(sender.getName(), "Orbiting " + p.getName(), true); } else { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java index 5039397..3e789ec 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_permban.java @@ -55,10 +55,7 @@ public class Command_permban extends TFM_Command else { TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_players.size() + " permanently banned players:"); - for (String player_name : TotalFreedomMod.permbanned_players) - { - TFM_Util.playerMsg(sender, "- " + player_name); - } + TFM_Util.playerMsg(sender, ChatColor.GRAY + TFM_Util.implodeStringList(", ", TotalFreedomMod.permbanned_players)); } if (TotalFreedomMod.permbanned_ips.isEmpty()) @@ -68,10 +65,7 @@ public class Command_permban extends TFM_Command else { TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_ips.size() + " permanently banned IPs:"); - for (String ip_address : TotalFreedomMod.permbanned_ips) - { - TFM_Util.playerMsg(sender, "- " + ip_address); - } + TFM_Util.playerMsg(sender, ChatColor.GRAY + TFM_Util.implodeStringList(", ", TotalFreedomMod.permbanned_ips)); } } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java index b7603c1..211c011 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rank.java @@ -27,7 +27,7 @@ public class Command_rank extends TFM_Command if (args.length == 0) { - TFM_Util.playerMsg(sender, sender.getName() + " is " + TFM_Util.getRank(sender), ChatColor.AQUA); + TFM_Util.bcastMsg(sender.getName() + " is " + TFM_Util.getRank(sender), ChatColor.AQUA); return true; } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java index 7f51060..0877cf9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java @@ -19,7 +19,8 @@ public class Command_rd extends TFM_Command 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 TFM_Util.adminAction(sender.getName(), "Removing all server entities.", false); sender.sendMessage(ChatColor.GRAY + String.valueOf(TFM_Util.wipeEntities(true, true)) + " enties removed."); diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stop.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stop.java index fa9bdc6..e6c38cc 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stop.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_stop.java @@ -15,7 +15,7 @@ public class Command_stop extends TFM_Command { if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender)) { - TFM_Util.bcastMsg("Server is going offline.", ChatColor.GRAY); + TFM_Util.bcastMsg("Server is going offline!", ChatColor.LIGHT_PURPLE); for (Player p : server.getOnlinePlayers()) { diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java index 62d74a9..f497ff2 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java @@ -68,19 +68,16 @@ public class TFM_Util TFM_Util.bcastMsg(message, null); } - //JeromSar public static void playerMsg(CommandSender sender, String message, ChatColor color) { sender.sendMessage(color + message); } - //JeromSar public static void playerMsg(CommandSender sender, String message) { TFM_Util.playerMsg(sender, message, ChatColor.GRAY); } - //JeromSar public static void adminAction(String adminName, String action, boolean isRed) { TFM_Util.bcastMsg(adminName + " - " + action, (isRed ? ChatColor.RED : ChatColor.AQUA)); @@ -544,7 +541,6 @@ public class TFM_Util return TFM_SuperadminList.isSuperadminImpostor(user); } - //JeromSar public static String getRank(CommandSender sender) { if (TFM_SuperadminList.isSuperadminImpostor(sender)) @@ -574,7 +570,7 @@ public class TFM_Util } else { - return "an " + ChatColor.RED + "admin" + ChatColor.AQUA + "."; + return "a " + ChatColor.RED + "super admin" + ChatColor.AQUA + "."; } } }