Removed pointless check, added comment for adminChatToggle in vminecraftCommands.

This commit is contained in:
nossr50 2010-11-30 20:14:47 -08:00
parent 0abd500f63
commit e013ac787d

View File

@ -46,11 +46,18 @@ public class vminecraftCommands{
cl.registerAlias("/wrists", "/suicide"); cl.registerAlias("/wrists", "/suicide");
cl.registerAlias("/ci", "/clearinventory"); cl.registerAlias("/ci", "/clearinventory");
} }
public static int adminChatToggle(Player player, String[] args) //=====================================================================
//Function: adminChatToggle (/a)
//Input: Player player: The player using the command
//Output: int: Exit Code
//Use: Toggles the player into admin chat. Every message they
// send will be piped to admin chat.
//=====================================================================
public static int adminChatToggle(Player player)
{ {
if(vminecraftSettings.getInstance().adminChatToggle()) if(vminecraftSettings.getInstance().adminChatToggle())
{ {
if (vminecraftSettings.getInstance().cmdAdminToggle) {
//If the player is already toggled for admin chat, remove them //If the player is already toggled for admin chat, remove them
if (vminecraftSettings.getInstance().isAdminToggled(player.getName())) { if (vminecraftSettings.getInstance().isAdminToggled(player.getName())) {
player.sendMessage(Colors.Red + "Admin Chat Toggle = off"); player.sendMessage(Colors.Red + "Admin Chat Toggle = off");
@ -62,7 +69,6 @@ public static int adminChatToggle(Player player, String[] args)
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
}
return EXIT_FAIL; return EXIT_FAIL;
} }
//===================================================================== //=====================================================================