corrected (hopefully) the chat response for show/hide commands

This commit is contained in:
Arthur Mayer 2011-02-20 20:06:07 +01:00
parent e15514291b
commit 298c0f3391

View File

@ -36,23 +36,25 @@ public class DynmapPlayerListener extends PlayerListener {
event.setCancelled(true);
} else if (split[1].equals("hide")) {
Player player = event.getPlayer();
player.sendMessage("You are now hidden on Dynmap.");
if (split.length == 2) {
playerList.hide(player.getName());
player.sendMessage("You are now hidden on Dynmap.");
} else {
for (int i = 2; i < split.length; i++) {
playerList.hide(split[i]);
player.sendMessage(split[i] + " is now hidden on Dynmap.");
}
}
event.setCancelled(true);
} else if (split[1].equals("show")) {
Player player = event.getPlayer();
player.sendMessage("You are now visible on Dynmap.");
if (split.length == 2) {
playerList.show(player.getName());
player.sendMessage("You are now visible on Dynmap.");
} else {
for (int i = 2; i < split.length; i++) {
playerList.show(split[i]);
player.sendMessage(split[i] + " is now visible on Dynmap.");
}
}
event.setCancelled(true);