Actually remove /mmoupdate, fix usage strings for /mcconvert, fix tab completion

Fixes #1451
This commit is contained in:
GJ 2013-09-10 15:47:15 -04:00
parent 93fe2ff504
commit af39e84aef
3 changed files with 7 additions and 17 deletions

View File

@ -79,10 +79,11 @@ public class McconvertCommand implements TabExecutor {
return StringUtil.copyPartialMatches(args[0], SUBCOMMANDS, new ArrayList<String>(SUBCOMMANDS.size())); return StringUtil.copyPartialMatches(args[0], SUBCOMMANDS, new ArrayList<String>(SUBCOMMANDS.size()));
case 2: case 2:
if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) { if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) {
StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList<String>(DATABASE_TYPES.size())); return StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList<String>(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<String>(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<String>(FORMULA_TYPES.size()));
} }
return ImmutableList.of(); return ImmutableList.of();

View File

@ -273,15 +273,6 @@ public final class CommandRegistrationManager {
command.setExecutor(new McremoveCommand()); 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", "<flatfile|sql|" + LocaleLoader.getString("Commands.Usage.FullClassName") + ">"));
// command.setExecutor(new MmoupdateCommand());
// }
private static void registerMmoshowdbCommand() { private static void registerMmoshowdbCommand() {
PluginCommand command = mcMMO.p.getCommand("mmoshowdb"); PluginCommand command = mcMMO.p.getCommand("mmoshowdb");
command.setDescription(LocaleLoader.getString("Commands.Description.mmoshowdb")); command.setDescription(LocaleLoader.getString("Commands.Description.mmoshowdb"));
@ -296,7 +287,8 @@ public final class CommandRegistrationManager {
command.setDescription(LocaleLoader.getString("Commands.Description.mcconvert")); command.setDescription(LocaleLoader.getString("Commands.Description.mcconvert"));
command.setPermission("mcmmo.commands.mcconvert;mcmmo.commands.mcconvert.experience;mcmmo.commands.mcconvert.database"); command.setPermission("mcmmo.commands.mcconvert;mcmmo.commands.mcconvert.experience;mcmmo.commands.mcconvert.database");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.2", "mcconvert", "<database|experience>", "<linear|exponential>")); command.setUsage(LocaleLoader.getString("Commands.Usage.2", "mcconvert", "database", "<flatfile|sql>"));
command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.2", "mcconvert", "experience", "<linear|exponential>"));
command.setExecutor(new McconvertCommand()); command.setExecutor(new McconvertCommand());
} }

View File

@ -57,8 +57,6 @@ commands:
description: Create/join a party description: Create/join a party
inspect: inspect:
description: View detailed mcMMO info on another player description: View detailed mcMMO info on another player
mmoupdate:
description: Migrate mcMMO database from an old database type to the current
mmoshowdb: mmoshowdb:
description: Show the name of the current database type (for later use with /mmoupdate) description: Show the name of the current database type (for later use with /mmoupdate)
mcconvert: mcconvert:
@ -627,7 +625,6 @@ permissions:
description: Implies access to everything in mcMMO description: Implies access to everything in mcMMO
children: children:
mcmmo.commands.mcconvert.all: true mcmmo.commands.mcconvert.all: true
mcmmo.commands.mmoupdate: true
mcmmo.commands.xprate.all: true mcmmo.commands.xprate.all: true
mcmmo.bypass.*: mcmmo.bypass.*:
default: false default: false
@ -950,7 +947,7 @@ permissions:
description: Allows access to the mmoedit command for other players description: Allows access to the mmoedit command for other players
mcmmo.commands.mmoupdate: mcmmo.commands.mmoupdate:
default: false default: false
description: Allows access to the mmoupdate command description: Allows access to the mcconvert database command
children: children:
mcmmo.commands.mcconvert.database: true mcmmo.commands.mcconvert.database: true
mcmmo.commands.mmoshowdb: mcmmo.commands.mmoshowdb: