diff --git a/src/main/java/com/gmail/nossr50/commands/database/McconvertCommand.java b/src/main/java/com/gmail/nossr50/commands/database/McconvertCommand.java index c53817de9..e5d6c3ddd 100644 --- a/src/main/java/com/gmail/nossr50/commands/database/McconvertCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/database/McconvertCommand.java @@ -79,10 +79,11 @@ public class McconvertCommand implements TabExecutor { return StringUtil.copyPartialMatches(args[0], SUBCOMMANDS, new ArrayList(SUBCOMMANDS.size())); case 2: if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) { - StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList(DATABASE_TYPES.size())); + return StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList(DATABASE_TYPES.size())); } - else if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[0].equalsIgnoreCase("exp")) { - StringUtil.copyPartialMatches(args[0], FORMULA_TYPES, new ArrayList(FORMULA_TYPES.size())); + + if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[0].equalsIgnoreCase("exp")) { + return StringUtil.copyPartialMatches(args[0], FORMULA_TYPES, new ArrayList(FORMULA_TYPES.size())); } return ImmutableList.of(); diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index b6fc93dd2..2a449f20a 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -273,15 +273,6 @@ public final class CommandRegistrationManager { command.setExecutor(new McremoveCommand()); } -// private static void registerMmoupdateCommand() { -// PluginCommand command = mcMMO.p.getCommand("mmoupdate"); -// command.setDescription(LocaleLoader.getString("Commands.Description.mmoupdate")); -// command.setPermission("mcmmo.commands.mmoupdate"); -// command.setPermissionMessage(LocaleLoader.getString("Commands.mmoupdate.OpOnly")); -// command.setUsage(LocaleLoader.getString("Commands.Usage.1", "mmoupdate", "")); -// command.setExecutor(new MmoupdateCommand()); -// } - private static void registerMmoshowdbCommand() { PluginCommand command = mcMMO.p.getCommand("mmoshowdb"); command.setDescription(LocaleLoader.getString("Commands.Description.mmoshowdb")); @@ -296,7 +287,8 @@ public final class CommandRegistrationManager { command.setDescription(LocaleLoader.getString("Commands.Description.mcconvert")); command.setPermission("mcmmo.commands.mcconvert;mcmmo.commands.mcconvert.experience;mcmmo.commands.mcconvert.database"); command.setPermissionMessage(permissionsMessage); - command.setUsage(LocaleLoader.getString("Commands.Usage.2", "mcconvert", "", "")); + command.setUsage(LocaleLoader.getString("Commands.Usage.2", "mcconvert", "database", "")); + command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.2", "mcconvert", "experience", "")); command.setExecutor(new McconvertCommand()); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ff1775a64..ea78a57e2 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -57,8 +57,6 @@ commands: description: Create/join a party inspect: description: View detailed mcMMO info on another player - mmoupdate: - description: Migrate mcMMO database from an old database type to the current mmoshowdb: description: Show the name of the current database type (for later use with /mmoupdate) mcconvert: @@ -627,7 +625,6 @@ permissions: description: Implies access to everything in mcMMO children: mcmmo.commands.mcconvert.all: true - mcmmo.commands.mmoupdate: true mcmmo.commands.xprate.all: true mcmmo.bypass.*: default: false @@ -950,7 +947,7 @@ permissions: description: Allows access to the mmoedit command for other players mcmmo.commands.mmoupdate: default: false - description: Allows access to the mmoupdate command + description: Allows access to the mcconvert database command children: mcmmo.commands.mcconvert.database: true mcmmo.commands.mmoshowdb: