diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index da315e4a0..882975b59 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -210,9 +210,17 @@ private static HashMap hidden = new HashMap(); } public static int silent(Player player, String[] args){ if(player.canUseCommand("/silent")){ - vMinecraftUsers.getProfile(player).setSilent(); - player.sendMessage(Colors.DarkPurple + "You are now silent"); - return EXIT_SUCCESS; + if(!vMinecraftUsers.getProfile(player).isSilent()){ + vMinecraftUsers.getProfile(player).setSilent(); + player.sendMessage(Colors.DarkPurple + "You are now silent... shh"); + return EXIT_SUCCESS; + } + if(vMinecraftUsers.getProfile(player).isSilent()){ + vMinecraftUsers.getProfile(player).disableSilent(); + player.sendMessage(Colors.DarkPurple + "You are no longer silent"); + return EXIT_SUCCESS; + } + return EXIT_FAIL; } return EXIT_FAIL; } @@ -1174,7 +1182,8 @@ private static HashMap hidden = new HashMap(); String xyz = x2+","+y2+","+z2; vMinecraftUsers.getProfile(player).setTpback(xyz); if(player.canUseCommand("/tpback")){ - player.sendMessage(Colors.DarkPurple + "Your previous location has been stored, use /tpback to return."); + player.sendMessage(Colors.DarkPurple + "Your previous location has been stored"); + player.sendMessage(Colors.DarkPurple + "Use /tpback to return"); } if(!vMinecraftUsers.getProfile(player).isSilent()){ vMinecraftChat.gmsg( player, vMinecraftChat.getName(player) @@ -1270,7 +1279,8 @@ private static HashMap hidden = new HashMap(); vMinecraftUsers.getProfile(playerTarget).setTpback(xyz); if(playerTarget.canUseCommand("/tpback")) { - playerTarget.sendMessage(Colors.DarkPurple + "Your previous location has been stored, use /tpback to return."); + player.sendMessage(Colors.DarkPurple + "Your previous location has been stored"); + player.sendMessage(Colors.DarkPurple + "Use /tpback to return"); } } return EXIT_SUCCESS; diff --git a/vMinecraftUsers.java b/vMinecraftUsers.java index fc1eb3da0..cd5617a3e 100644 --- a/vMinecraftUsers.java +++ b/vMinecraftUsers.java @@ -517,12 +517,7 @@ class PlayerList silent = false; } public boolean isSilent(){ - if(silent == true){ - return true; - } - else { - return false; - } + return silent; } //Store the player's party public void setParty(String newParty)