Batch format fix

This commit is contained in:
JeromSar 2013-08-12 14:41:04 +02:00
parent 69fd3566af
commit 4e3c9a6b9e
4 changed files with 9 additions and 9 deletions

View File

@ -14,9 +14,11 @@ import org.bukkit.entity.Player;
@CommandParameters(description = "Sets yourself a prefix", usage = "/<command> <<prefix> | off | clear <player> | clearall>") @CommandParameters(description = "Sets yourself a prefix", usage = "/<command> <<prefix> | off | clear <player> | clearall>")
public class Command_tag extends TFM_Command public class Command_tag extends TFM_Command
{ {
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]{"admin", "owner", "moderator", "developer"}); {
"admin", "owner", "moderator", "developer"
});
@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)
{ {
@ -52,7 +54,7 @@ public class Command_tag extends TFM_Command
playerMsg("This can only be used by players."); playerMsg("This can only be used by players.");
return true; return true;
} }
if (TFM_Util.isStopCommand(args[0])) if (TFM_Util.isStopCommand(args[0]))
{ {
TFM_PlayerData.getPlayerData(sender_p).setTag(null); TFM_PlayerData.getPlayerData(sender_p).setTag(null);
@ -111,8 +113,7 @@ public class Command_tag extends TFM_Command
return false; return false;
} }
return false; return false;
} }
} }

View File

@ -442,7 +442,8 @@ public class TFM_PlayerListener implements Listener
event.setMessage(message); event.setMessage(message);
// Set the tag // Set the tag
if (playerdata.getTag() != null) { if (playerdata.getTag() != null)
{
p.setDisplayName((playerdata.getTag() + " " + p.getDisplayName().replaceAll(" ", ""))); p.setDisplayName((playerdata.getTag() + " " + p.getDisplayName().replaceAll(" ", "")));
} }

View File

@ -522,5 +522,4 @@ public class TFM_PlayerData
{ {
return this.tag; return this.tag;
} }
} }

View File

@ -906,7 +906,6 @@ public class TFM_Util
while (checkClass.getSuperclass() != Object.class && ((checkClass = checkClass.getSuperclass()) != null)); while (checkClass.getSuperclass() != Object.class && ((checkClass = checkClass.getSuperclass()) != null));
return null; return null;
} }
public static final List<ChatColor> COLOR_POOL = Arrays.asList( public static final List<ChatColor> COLOR_POOL = Arrays.asList(
ChatColor.DARK_BLUE, ChatColor.DARK_BLUE,
ChatColor.DARK_GREEN, ChatColor.DARK_GREEN,