浏览代码

Updating the permissions for the /mcrank command.

Glitchfinder 12 年之前
父节点
当前提交
b01d80b1f4
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 4 0
      src/main/java/com/gmail/nossr50/commands/player/McrankCommand.java
  2. 3 0
      src/main/resources/plugin.yml

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

@@ -39,6 +39,10 @@ public class McrankCommand implements CommandExecutor {
             break;
             break;
 
 
         case 1:
         case 1:
+            if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.mcrank.others")) {
+                return true;
+            }
+
             playerName = args[0];
             playerName = args[0];
             break;
             break;
 
 

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

@@ -715,6 +715,7 @@ permissions:
             mcmmo.commands.mcgod: true
             mcmmo.commands.mcgod: true
             mcmmo.commands.mcgod.others: true
             mcmmo.commands.mcgod.others: true
             mcmmo.commands.mcpurge: true
             mcmmo.commands.mcpurge: true
+            mcmmo.commands.mcrank.others: true
             mcmmo.commands.mmoedit: true
             mcmmo.commands.mmoedit: true
             mcmmo.commands.mmoedit.others: true
             mcmmo.commands.mmoedit.others: true
             mcmmo.commands.mmoupdate: true
             mcmmo.commands.mmoupdate: true
@@ -773,6 +774,8 @@ permissions:
         description: Allows access to the mcpurge command
         description: Allows access to the mcpurge command
     mcmmo.commands.mcrank:
     mcmmo.commands.mcrank:
         description: Allows access to the mcrank command
         description: Allows access to the mcrank command
+    mcmmo.commands.mcrank.others:
+        description: Allows access to the mcrank command for other players
     mcmmo.commands.mcstats:
     mcmmo.commands.mcstats:
         description: Allows access to the mcstats command
         description: Allows access to the mcstats command
     mcmmo.commands.mctop:
     mcmmo.commands.mctop: