mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-28 12:47:36 +00:00
Changed colors to match the forums
This commit is contained in:
parent
808e02f660
commit
7140e4c8df
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Sun Dec 01 18:16:33 CET 2013
|
||||
build.number=650
|
||||
#Sun Dec 01 18:54:19 CET 2013
|
||||
build.number=657
|
||||
|
@ -63,41 +63,60 @@ public class Command_list extends TFM_Command
|
||||
|
||||
final StringBuilder prefix = new StringBuilder();
|
||||
|
||||
if (TFM_Util.DEVELOPERS.contains(player.getName()))
|
||||
{
|
||||
prefix.append(ChatColor.DARK_PURPLE).append("[Dev]");
|
||||
names.add(prefix.append(player.getName()).toString());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (userSuperadmin)
|
||||
{
|
||||
TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(player.getName());
|
||||
|
||||
if (player.getName().equals("markbyron"))
|
||||
{
|
||||
prefix.append(ChatColor.DARK_RED).append("[Owner]");
|
||||
names.add(prefix.append(player.getName()).toString());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (entry == null)
|
||||
{
|
||||
prefix.append(ChatColor.GOLD).append("[SA]");
|
||||
entry = TFM_SuperadminList.getAdminEntryByIP(player.getAddress().getAddress().getHostAddress().trim());
|
||||
if (entry == null)
|
||||
{
|
||||
prefix.append(ChatColor.AQUA).append("[SA]");
|
||||
names.add(prefix.append(player.getName()).toString());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (entry.isSeniorAdmin())
|
||||
|
||||
if (entry.isSeniorAdmin())
|
||||
{
|
||||
prefix.append(ChatColor.LIGHT_PURPLE).append("[SrA]");
|
||||
prefix.append(ChatColor.GOLD).append("[SrA]");
|
||||
}
|
||||
else if (entry.isTelnetAdmin())
|
||||
{
|
||||
prefix.append(ChatColor.DARK_GREEN).append("[STA]");
|
||||
}
|
||||
|
||||
if (TFM_Util.DEVELOPERS.contains(player.getName()))
|
||||
else
|
||||
{
|
||||
prefix.append(ChatColor.DARK_PURPLE).append("[Dev]");
|
||||
}
|
||||
|
||||
if (player.getName().equals("markbyron"))
|
||||
{
|
||||
prefix.append(ChatColor.BLUE).append("[Owner]");
|
||||
prefix.append(ChatColor.AQUA).append("[SA]");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.isOp())
|
||||
{
|
||||
prefix.append(ChatColor.RED).append("[OP]");
|
||||
prefix.append(ChatColor.BLUE).append("[OP]");
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix.append(ChatColor.GREEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
names.add(prefix.append(player.getName()).toString());
|
||||
}
|
||||
|
||||
|
@ -26,39 +26,37 @@ public class TFM_ServerListener implements Listener
|
||||
// Comment this method out if you want to compile this without a custom CraftBukkit.
|
||||
// Just make sure that enable-command-block=false in server.properties.
|
||||
// -Madgeek
|
||||
|
||||
/* Temporary: Until we get a custom CB build out
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onCommandBlockSet(org.bukkit.event.server.CommandBlockSetEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
String newCommandRaw = event.getNewCommand();
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onCommandBlockSet(org.bukkit.event.server.CommandBlockSetEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
String newCommandRaw = event.getNewCommand();
|
||||
|
||||
if (!TFM_SuperadminList.isSeniorAdmin(player, true))
|
||||
{
|
||||
player.sendMessage(ChatColor.GRAY + "Only senior admins may set command block commands.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (!TFM_SuperadminList.isSeniorAdmin(player, true))
|
||||
{
|
||||
player.sendMessage(ChatColor.GRAY + "Only senior admins may set command block commands.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Matcher matcher = Pattern.compile("^/?(\\S+)").matcher(newCommandRaw);
|
||||
if (matcher.find())
|
||||
{
|
||||
String topLevelCommand = matcher.group(1);
|
||||
if (topLevelCommand != null)
|
||||
{
|
||||
topLevelCommand = topLevelCommand.toLowerCase().trim();
|
||||
|
||||
// We need to make it look like the command is coming from the console, so keep the player's name without the Player instance via dummy:
|
||||
if (TFM_CommandBlocker.getInstance().isCommandBlocked(topLevelCommand, new TFM_ServerListener_DummyCommandSender(player.getName()), false))
|
||||
{
|
||||
player.sendMessage(ChatColor.GRAY + "That command is blocked.");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
Matcher matcher = Pattern.compile("^/?(\\S+)").matcher(newCommandRaw);
|
||||
if (matcher.find())
|
||||
{
|
||||
String topLevelCommand = matcher.group(1);
|
||||
if (topLevelCommand != null)
|
||||
{
|
||||
topLevelCommand = topLevelCommand.toLowerCase().trim();
|
||||
|
||||
// We need to make it look like the command is coming from the console, so keep the player's name without the Player instance via dummy:
|
||||
if (TFM_CommandBlocker.getInstance().isCommandBlocked(topLevelCommand, new TFM_ServerListener_DummyCommandSender(player.getName()), false))
|
||||
{
|
||||
player.sendMessage(ChatColor.GRAY + "That command is blocked.");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onRemoteServerCommand(RemoteServerCommandEvent event)
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ public class TFM_Util
|
||||
|
||||
if (entry.isSeniorAdmin())
|
||||
{
|
||||
return "a " + ChatColor.LIGHT_PURPLE + "Senior Admin" + ChatColor.AQUA + ".";
|
||||
return "a " + ChatColor.GOLD + "Senior Admin" + ChatColor.AQUA + ".";
|
||||
}
|
||||
else if (entry.isTelnetAdmin())
|
||||
{
|
||||
@ -445,13 +445,13 @@ public class TFM_Util
|
||||
}
|
||||
else
|
||||
{
|
||||
return "a " + ChatColor.GOLD + "Super Admin" + ChatColor.AQUA + ".";
|
||||
return "a " + ChatColor.AQUA + "Super Admin" + ChatColor.AQUA + ".";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sender.isOp())
|
||||
{
|
||||
return "an " + ChatColor.DARK_GREEN + "OP" + ChatColor.AQUA + ".";
|
||||
return "an " + ChatColor.BLUE + "OP" + ChatColor.AQUA + ".";
|
||||
}
|
||||
|
||||
return "a " + ChatColor.GREEN + "non-OP" + ChatColor.AQUA + ".";
|
||||
@ -791,14 +791,14 @@ public class TFM_Util
|
||||
else
|
||||
{
|
||||
final TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(sender.getName());
|
||||
|
||||
if (entry == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (entry.isSeniorAdmin())
|
||||
|
||||
if (entry == null)
|
||||
{
|
||||
prefix = ChatColor.LIGHT_PURPLE + "(SrA)";
|
||||
return ChatColor.AQUA + "(SA)";
|
||||
}
|
||||
else if (entry.isSeniorAdmin())
|
||||
{
|
||||
prefix = ChatColor.GOLD + "(SrA)";
|
||||
}
|
||||
else if (entry.isTelnetAdmin())
|
||||
{
|
||||
@ -806,14 +806,15 @@ public class TFM_Util
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = ChatColor.GOLD + "(SA)";
|
||||
prefix = ChatColor.AQUA + "(SA)";
|
||||
}
|
||||
|
||||
|
||||
if (DEVELOPERS.contains(sender.getName()))
|
||||
{
|
||||
prefix = ChatColor.DARK_PURPLE + "(Dev)";
|
||||
}
|
||||
}
|
||||
|
||||
return prefix + ChatColor.WHITE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user