소스 검색

Updating permissions for the /mcrefresh command.

Glitchfinder 12 년 전
부모
커밋
dee384c8b9
2개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/main/java/com/gmail/nossr50/commands/admin/McrefreshCommand.java
  2. 9 0
      src/main/resources/plugin.yml

+ 5 - 1
src/main/java/com/gmail/nossr50/commands/admin/McrefreshCommand.java

@@ -19,7 +19,7 @@ public class McrefreshCommand implements CommandExecutor {
         PlayerProfile profile;
         String usage = LocaleLoader.getString("Commands.Usage.1", "mcrefresh", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]");
 
-        if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcrefresh")) {
+        if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.mcrefresh")) {
             return true;
         }
 
@@ -36,6 +36,10 @@ public class McrefreshCommand implements CommandExecutor {
             break;
 
         case 1:
+            if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.mcrefresh.others")) {
+                return true;
+            }
+
             player = mcMMO.p.getServer().getOfflinePlayer(args[0]);
             profile = Users.getProfile(player);
             String playerName = player.getName();

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

@@ -336,6 +336,9 @@ permissions:
             mcmmo.tools.mcremove: true
     mcmmo.tools.mcrefresh:
         description: Allows access to mcrefresh command
+        children:
+            mcmmo.commands.mcrefresh: true
+            mcmmo.commands.mcrefresh.others: true
     mcmmo.tools.mmoedit:
         default: false
         description: Allows access to mmoedit command
@@ -716,6 +719,8 @@ permissions:
             mcmmo.commands.mcgod.others: true
             mcmmo.commands.mcpurge: true
             mcmmo.commands.mcrank.others.all: true
+            mcmmo.commands.mcrefresh: true
+            mcmmo.commands.mcrefresh.others: true
             mcmmo.commands.mmoedit: true
             mcmmo.commands.mmoedit.others: true
             mcmmo.commands.mmoupdate: true
@@ -790,6 +795,10 @@ permissions:
         description: Allows access to the mcrank command for far players
     mcmmo.commands.mcrank.others.offline:
         description: Allows access to the mcrank command for offline players
+    mcmmo.commands.mcrefresh:
+        description: Allows access to the mcrefresh command
+    mcmmo.commands.mcrefresh.others:
+        description: Allows access to the mcrefresh command for other players
     mcmmo.commands.mcstats:
         description: Allows access to the mcstats command
     mcmmo.commands.mctop: