Sfoglia il codice sorgente

Adding a permission for the /mcc command.

Glitchfinder 12 anni fa
parent
commit
6d486401b5

+ 4 - 0
src/main/java/com/gmail/nossr50/commands/player/MccCommand.java

@@ -17,6 +17,10 @@ public class MccCommand implements CommandExecutor {
             return true;
         }
 
+        if (!Permissions.hasPermission(sender, "mcmmo.commands.mcc")) {
+            return true;
+        }
+
         Player player = (Player) sender;
 
         player.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));

+ 3 - 0
src/main/resources/plugin.yml

@@ -728,6 +728,7 @@ permissions:
             mcmmo.commands.herbalism: true
             mcmmo.commands.inspect: true
             mcmmo.commands.mcability: true
+            mcmmo.commands.mcc: true
             mcmmo.commands.mchud: true
             mcmmo.commands.mcmmo: true
             mcmmo.commands.mcrank: true
@@ -790,6 +791,8 @@ permissions:
         description: Allows access to the mcability command
     mcmmo.commands.mcability.others:
         description: Allows access to the mcability command for other players
+    mcmmo.commands.mcc:
+        description: Allows access to the mcc command
     mcmmo.commands.mcgod:
         description: Allows access to the mcgod command
     mcmmo.commands.mcgod.others: