Added permission check for /prefix

This commit is contained in:
nossr50 2010-12-09 15:49:43 -08:00
parent 16f5c86d36
commit 93e55a242c

View File

@ -124,7 +124,16 @@ public class vMinecraftCommands{
vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "Global Messages: " + vMinecraftSettings.getInstance().globalmessages()); vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "Global Messages: " + vMinecraftSettings.getInstance().globalmessages());
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
//=====================================================================
//Function: prefix (/prefix)
//Input: Player player: The player using the command
//Output: int: Exit Code
//Use: Changes your name color and prefix
//=====================================================================
public static int prefix(Player player, String[] args){ public static int prefix(Player player, String[] args){
if(!player.canUseCommand("/prefix")){
return EXIT_FAIL;
}
if(args.length <= 1){ if(args.length <= 1){
vMinecraftChat.sendMessage(player, player, Colors.Rose + "Usage is /prefix [name color code] <prefix>"); vMinecraftChat.sendMessage(player, player, Colors.Rose + "Usage is /prefix [name color code] <prefix>");
vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "Example: /prefix e ^0[^a<3^0]"); vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "Example: /prefix e ^0[^a<3^0]");