Moved some code around

This commit is contained in:
Tim Visée 2015-11-01 18:58:22 +01:00
parent afd46edb39
commit 443e9954af

View File

@ -153,6 +153,19 @@ public class CommandManager {
unregisterCommand.setCommandPermissions("authme.admin.unregister", CommandPermissions.DefaultPermission.OP_ONLY); unregisterCommand.setCommandPermissions("authme.admin.unregister", CommandPermissions.DefaultPermission.OP_ONLY);
unregisterCommand.addArgument(new CommandArgumentDescription("player", "Player name", false)); unregisterCommand.addArgument(new CommandArgumentDescription("player", "Player name", false));
// Register the forcelogin command
CommandDescription forceLoginCommand = new CommandDescription(
new ForceLoginCommand(),
new ArrayList<String>() {{
add("forcelogin");
add("login");
}},
"Force login player",
"Force the specified player to login.",
authMeCommand);
forceLoginCommand.setCommandPermissions("authme.admin.forcelogin", CommandPermissions.DefaultPermission.OP_ONLY);
forceLoginCommand.addArgument(new CommandArgumentDescription("player", "Online player name", true));
// Register the changepassword command // Register the changepassword command
CommandDescription changePasswordCommand = new CommandDescription( CommandDescription changePasswordCommand = new CommandDescription(
new RegisterCommand(), new RegisterCommand(),
@ -238,19 +251,6 @@ public class CommandManager {
getIpCommand.setCommandPermissions("authme.admin.getip", CommandPermissions.DefaultPermission.OP_ONLY); getIpCommand.setCommandPermissions("authme.admin.getip", CommandPermissions.DefaultPermission.OP_ONLY);
getIpCommand.addArgument(new CommandArgumentDescription("player", "Online player name", true)); getIpCommand.addArgument(new CommandArgumentDescription("player", "Online player name", true));
// Register the forcelogin command
CommandDescription forceLoginCommand = new CommandDescription(
new ForceLoginCommand(),
new ArrayList<String>() {{
add("forcelogin");
add("login");
}},
"Force login player",
"Force the specified player to login.",
authMeCommand);
forceLoginCommand.setCommandPermissions("authme.admin.forcelogin", CommandPermissions.DefaultPermission.OP_ONLY);
forceLoginCommand.addArgument(new CommandArgumentDescription("player", "Online player name", true));
// Register the spawn command // Register the spawn command
CommandDescription spawnCommand = new CommandDescription( CommandDescription spawnCommand = new CommandDescription(
new SpawnCommand(), new SpawnCommand(),