mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 09:13:43 +01:00 
			
		
		
		
	Added permission check for /prefix
This commit is contained in:
		| @@ -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]"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nossr50
					nossr50