mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-12 13:34:47 +01:00
corrected (hopefully) the chat response for show/hide commands
This commit is contained in:
parent
e15514291b
commit
298c0f3391
@ -36,23 +36,25 @@ public class DynmapPlayerListener extends PlayerListener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (split[1].equals("hide")) {
|
} else if (split[1].equals("hide")) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
player.sendMessage("You are now hidden on Dynmap.");
|
if (split.length == 2) {
|
||||||
if (split.length == 2) {
|
|
||||||
playerList.hide(player.getName());
|
playerList.hide(player.getName());
|
||||||
|
player.sendMessage("You are now hidden on Dynmap.");
|
||||||
} else {
|
} else {
|
||||||
for (int i = 2; i < split.length; i++) {
|
for (int i = 2; i < split.length; i++) {
|
||||||
playerList.hide(split[i]);
|
playerList.hide(split[i]);
|
||||||
|
player.sendMessage(split[i] + " is now hidden on Dynmap.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (split[1].equals("show")) {
|
} else if (split[1].equals("show")) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
player.sendMessage("You are now visible on Dynmap.");
|
if (split.length == 2) {
|
||||||
if (split.length == 2) {
|
|
||||||
playerList.show(player.getName());
|
playerList.show(player.getName());
|
||||||
|
player.sendMessage("You are now visible on Dynmap.");
|
||||||
} else {
|
} else {
|
||||||
for (int i = 2; i < split.length; i++) {
|
for (int i = 2; i < split.length; i++) {
|
||||||
playerList.show(split[i]);
|
playerList.show(split[i]);
|
||||||
|
player.sendMessage(split[i] + " is now visible on Dynmap.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user