Admin chat dupe fix

This commit is contained in:
NuclearW 2012-04-18 12:49:06 -04:00
parent 64871b4c37
commit 7c01fced68

View File

@ -54,19 +54,11 @@ public class ACommand implements CommandExecutor {
for (int i = 1; i <= args.length - 1; i++) { for (int i = 1; i <= args.length - 1; i++) {
aMessage = aMessage + " " + args[i]; aMessage = aMessage + " " + args[i];
} }
Users.getProfile(player).toggleAdminChat(); Users.getProfile(player).toggleAdminChat();
player.chat(aMessage); player.chat(aMessage);
Users.getProfile(player).toggleAdminChat(); Users.getProfile(player).toggleAdminChat();
String name = player.getName();
String aPrefix = ChatColor.AQUA + "{" + ChatColor.WHITE + name + ChatColor.AQUA + "} ";
Bukkit.getLogger().info("[A]<" + name + "> " + aMessage);
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
if (mcPermissions.getInstance().adminChat(herp) || herp.isOp())
herp.sendMessage(aPrefix + aMessage);
}
return true; return true;
} }