diff --git a/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java b/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java index 2199189e6..d53b3e48d 100644 --- a/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java +++ b/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java @@ -17,6 +17,7 @@ import com.gmail.nossr50.commands.player.InspectCommand; import com.gmail.nossr50.commands.player.McabilityCommand; import com.gmail.nossr50.commands.player.McmmoCommand; import com.gmail.nossr50.commands.player.McrankCommand; +import com.gmail.nossr50.commands.player.McstatsCommand; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.skills.acrobatics.AcrobaticsCommand; import com.gmail.nossr50.skills.archery.ArcheryCommand; @@ -229,4 +230,16 @@ public final class CommandRegistrationHelper { command.setUsage(LocaleLoader.getString("Commands.Usage.1", "mcrank", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">")); command.setExecutor(new McrankCommand()); } + + public static void registerMcstatsCommand() { + List aliasList = new ArrayList(); + aliasList.add("stats"); + + PluginCommand command = mcMMO.p.getCommand("mcstats"); + command.setDescription(LocaleLoader.getString("Commands.Description.mcstats")); + command.setPermission("mcmmo.commands.mcstats"); + command.setPermissionMessage(permissionsMessage); + command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mcstats")); + command.setExecutor(new McstatsCommand()); + } } diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 4a5172edf..3d7caeba8 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -26,7 +26,6 @@ import com.gmail.nossr50.chat.commands.ACommand; import com.gmail.nossr50.chat.commands.PCommand; import com.gmail.nossr50.commands.CommandRegistrationHelper; import com.gmail.nossr50.commands.player.MccCommand; -import com.gmail.nossr50.commands.player.McstatsCommand; import com.gmail.nossr50.commands.player.MctopCommand; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; @@ -446,7 +445,7 @@ public class mcMMO extends JavaPlugin { CommandRegistrationHelper.registerMcrefreshCommand(); getCommand("mctop").setExecutor(new MctopCommand()); CommandRegistrationHelper.registerMcrankCommand(); - getCommand("mcstats").setExecutor(new McstatsCommand()); + CommandRegistrationHelper.registerMcstatsCommand(); // Party commands getCommand("a").setExecutor(new ACommand()); diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index b1267039f..356a0cb2d 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -697,6 +697,7 @@ Commands.Description.mcgod=Toggle mcMMO god-mode on/off Commands.Description.mcmmo=Show a brief description of mcMMO Commands.Description.mcrank=Show mcMMO ranking for a player Commands.Description.mcrefresh=Refresh all cooldowns for mcMMO +Commands.Description.mcstats=Show your mcMMO levels and XP Commands.Description.mmoedit=Edit mcMMO levels for a user Commands.Description.Skill=Display detailed mcMMO skill info for {0} Commands.Description.skillreset=Reset mcMMO levels for a user diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7cef7660f..e406a1485 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -49,7 +49,6 @@ commands: mcgod: description: Toggle mcMMO god-mode on/off mcstats: - aliases: [/stats] description: Shows your mcMMO stats and xp mcremove: aliases: []