From 8bea153005b3d4ca8c365f6dc87fd83a59531731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Tue, 1 Dec 2015 16:17:37 +0100 Subject: [PATCH] Rebased administration command permission nodes --- .../xephi/authme/command/CommandManager.java | 22 ----------- .../authme/permission/AdminPermission.java | 37 +++++++++---------- 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/src/main/java/fr/xephi/authme/command/CommandManager.java b/src/main/java/fr/xephi/authme/command/CommandManager.java index cc335561..5769e055 100644 --- a/src/main/java/fr/xephi/authme/command/CommandManager.java +++ b/src/main/java/fr/xephi/authme/command/CommandManager.java @@ -136,7 +136,6 @@ public class CommandManager { // Register the getemail command CommandDescription getEmailCommand = new CommandDescription(new GetEmailCommand(), new ArrayList() { - { add("getemail"); add("getmail"); @@ -149,7 +148,6 @@ public class CommandManager { // Register the setemail command CommandDescription setEmailCommand = new CommandDescription(new SetEmailCommand(), new ArrayList() { - { add("chgemail"); add("chgmail"); @@ -163,7 +161,6 @@ public class CommandManager { // Register the getip command CommandDescription getIpCommand = new CommandDescription(new GetIpCommand(), new ArrayList() { - { add("getip"); add("ip"); @@ -174,7 +171,6 @@ public class CommandManager { // Register the spawn command CommandDescription spawnCommand = new CommandDescription(new SpawnCommand(), new ArrayList() { - { add("spawn"); add("home"); @@ -184,7 +180,6 @@ public class CommandManager { // Register the setspawn command CommandDescription setSpawnCommand = new CommandDescription(new SetSpawnCommand(), new ArrayList() { - { add("setspawn"); add("chgspawn"); @@ -194,7 +189,6 @@ public class CommandManager { // Register the firstspawn command CommandDescription firstSpawnCommand = new CommandDescription(new FirstSpawnCommand(), new ArrayList() { - { add("firstspawn"); add("firsthome"); @@ -204,7 +198,6 @@ public class CommandManager { // Register the setfirstspawn command CommandDescription setFirstSpawnCommand = new CommandDescription(new SetFirstSpawnCommand(), new ArrayList() { - { add("setfirstspawn"); add("chgfirstspawn"); @@ -214,7 +207,6 @@ public class CommandManager { // Register the purge command CommandDescription purgeCommand = new CommandDescription(new PurgeCommand(), new ArrayList() { - { add("purge"); add("delete"); @@ -225,7 +217,6 @@ public class CommandManager { // Register the purgelastposition command CommandDescription purgeLastPositionCommand = new CommandDescription(new PurgeLastPositionCommand(), new ArrayList() { - { add("resetpos"); add("purgelastposition"); @@ -240,7 +231,6 @@ public class CommandManager { // Register the purgebannedplayers command CommandDescription purgeBannedPlayersCommand = new CommandDescription(new PurgeBannedPlayersCommand(), new ArrayList() { - { add("purgebannedplayers"); add("purgebannedplayer"); @@ -252,7 +242,6 @@ public class CommandManager { // Register the switchantibot command CommandDescription switchAntiBotCommand = new CommandDescription(new SwitchAntiBotCommand(), new ArrayList() { - { add("switchantibot"); add("toggleantibot"); @@ -277,7 +266,6 @@ public class CommandManager { // Register the reload command CommandDescription reloadCommand = new CommandDescription(new ReloadCommand(), new ArrayList() { - { add("reload"); add("rld"); @@ -313,7 +301,6 @@ public class CommandManager { // Register the base logout command CommandDescription logoutBaseCommand = new CommandDescription(new LogoutCommand(), new ArrayList() { - { add("logout"); } @@ -327,7 +314,6 @@ public class CommandManager { // Register the base register command CommandDescription registerBaseCommand = new CommandDescription(new fr.xephi.authme.command.executable.register.RegisterCommand(), new ArrayList() { - { add("register"); add("reg"); @@ -344,7 +330,6 @@ public class CommandManager { // Register the base unregister command CommandDescription unregisterBaseCommand = new CommandDescription(new fr.xephi.authme.command.executable.unregister.UnregisterCommand(), new ArrayList() { - { add("unregister"); add("unreg"); @@ -359,7 +344,6 @@ public class CommandManager { // Register the base changepassword command CommandDescription changePasswordBaseCommand = new CommandDescription(new fr.xephi.authme.command.executable.changepassword.ChangePasswordCommand(), new ArrayList() { - { add("changepassword"); add("changepass"); @@ -376,7 +360,6 @@ public class CommandManager { // Register the base Dungeon Maze command CommandDescription emailBaseCommand = new CommandDescription(helpCommandExecutable, new ArrayList() { - { add("email"); add("mail"); @@ -390,7 +373,6 @@ public class CommandManager { // Register the add command CommandDescription addEmailCommand = new CommandDescription(new AddEmailCommand(), new ArrayList() { - { add("add"); add("addemail"); @@ -403,7 +385,6 @@ public class CommandManager { // Register the change command CommandDescription changeEmailCommand = new CommandDescription(new ChangeEmailCommand(), new ArrayList() { - { add("change"); add("changeemail"); @@ -416,7 +397,6 @@ public class CommandManager { // Register the recover command CommandDescription recoverEmailCommand = new CommandDescription(new RecoverEmailCommand(), new ArrayList() { - { add("recover"); add("recovery"); @@ -429,7 +409,6 @@ public class CommandManager { // Register the base captcha command CommandDescription captchaBaseCommand = new CommandDescription(new CaptchaCommand(), new ArrayList() { - { add("captcha"); add("capt"); @@ -445,7 +424,6 @@ public class CommandManager { // Register the base converter command CommandDescription converterBaseCommand = new CommandDescription(new ConverterCommand(), new ArrayList() { - { add("converter"); add("convert"); diff --git a/src/main/java/fr/xephi/authme/permission/AdminPermission.java b/src/main/java/fr/xephi/authme/permission/AdminPermission.java index 846c8322..979328bd 100644 --- a/src/main/java/fr/xephi/authme/permission/AdminPermission.java +++ b/src/main/java/fr/xephi/authme/permission/AdminPermission.java @@ -5,41 +5,41 @@ package fr.xephi.authme.permission; */ public enum AdminPermission implements PermissionNode { - REGISTER("authme.admin.register"), + REGISTER("authme.command.admin.register"), - UNREGISTER("authme.admin.unregister"), + UNREGISTER("authme.command.admin.unregister"), - FORCE_LOGIN("authme.admin.forcelogin"), + FORCE_LOGIN("authme.command.admin.forcelogin"), - CHANGE_PASSWORD("authme.admin.changepassword"), + CHANGE_PASSWORD("authme.command.admin.changepassword"), - LAST_LOGIN("authme.admin.lastlogin"), + LAST_LOGIN("authme.command.admin.lastlogin"), - ACCOUNTS("authme.admin.accounts"), + ACCOUNTS("authme.command.admin.accounts"), - GET_EMAIL("authme.admin.getemail"), + GET_EMAIL("authme.command.admin.getemail"), - CHANGE_EMAIL("authme.admin.chgemail"), + CHANGE_EMAIL("authme.command.admin.chgemail"), - GET_IP("authme.admin.getip"), + GET_IP("authme.command.admin.getip"), - SPAWN("authme.admin.spawn"), + SPAWN("authme.command.admin.spawn"), - SET_SPAWN("authme.admin.setspawn"), + SET_SPAWN("authme.command.admin.setspawn"), - FIRST_SPAWN("authme.admin.firstspawn"), + FIRST_SPAWN("authme.command.admin.firstspawn"), - SET_FIRST_SPAWN("authme.admin.setfirstspawn"), + SET_FIRST_SPAWN("authme.command.admin.setfirstspawn"), - PURGE("authme.admin.purge"), + PURGE("authme.command.admin.purge"), - PURGE_LAST_POSITION("authme.admin.purgelastpos"), + PURGE_LAST_POSITION("authme.command.admin.purgelastpos"), - PURGE_BANNED_PLAYERS("authme.admin.purgebannedplayers"), + PURGE_BANNED_PLAYERS("authme.command.admin.purgebannedplayers"), - SWITCH_ANTIBOT("authme.admin.switchantibot"), + SWITCH_ANTIBOT("authme.command.admin.switchantibot"), - RELOAD("authme.admin.reload"); + RELOAD("authme.command.admin.reload"); private String node; @@ -51,5 +51,4 @@ public enum AdminPermission implements PermissionNode { AdminPermission(String node) { this.node = node; } - }