From 298c0f3391b7295b760d29e30de9f3ef17ed639a Mon Sep 17 00:00:00 2001 From: Arthur Mayer Date: Sun, 20 Feb 2011 20:06:07 +0100 Subject: [PATCH] corrected (hopefully) the chat response for show/hide commands --- src/main/java/org/dynmap/DynmapPlayerListener.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/dynmap/DynmapPlayerListener.java b/src/main/java/org/dynmap/DynmapPlayerListener.java index b1e553ee..9c01e86e 100644 --- a/src/main/java/org/dynmap/DynmapPlayerListener.java +++ b/src/main/java/org/dynmap/DynmapPlayerListener.java @@ -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) { + 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++) { + 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) { + 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++) { + for (int i = 2; i < split.length; i++) { playerList.show(split[i]); + player.sendMessage(split[i] + " is now visible on Dynmap."); } } event.setCancelled(true);