mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 11:15:19 +01:00
- Remove deprecated builder - Fix introduced typos
This commit is contained in:
parent
330a275725
commit
595879b95e
@ -57,25 +57,6 @@ public class CommandDescription {
|
|||||||
*/
|
*/
|
||||||
private CommandPermissions permissions;
|
private CommandPermissions permissions;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param executableCommand The executable command, or null.
|
|
||||||
* @param labels List of command labels.
|
|
||||||
* @param description Command description.
|
|
||||||
* @param detailedDescription Detailed comment description.
|
|
||||||
* @param parent Parent command.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public CommandDescription(ExecutableCommand executableCommand, List<String> labels, String description, String detailedDescription, CommandDescription parent) {
|
|
||||||
setExecutableCommand(executableCommand);
|
|
||||||
this.labels = labels;
|
|
||||||
this.description = description;
|
|
||||||
this.detailedDescription = detailedDescription;
|
|
||||||
setParent(parent);
|
|
||||||
this.arguments = new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor. Use {@link CommandDescription#builder()} to create instances of this class.
|
* Private constructor. Use {@link CommandDescription#builder()} to create instances of this class.
|
||||||
* <p />
|
* <p />
|
||||||
|
@ -184,7 +184,6 @@ public final class CommandInitializer {
|
|||||||
.withArgument("player", "Player Name", false)
|
.withArgument("player", "Player Name", false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
// Register the spawn command
|
// Register the spawn command
|
||||||
CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new SpawnCommand())
|
.executableCommand(new SpawnCommand())
|
||||||
@ -216,7 +215,6 @@ public final class CommandInitializer {
|
|||||||
.permissions(OP_ONLY, AdminPermission.FIRST_SPAWN)
|
.permissions(OP_ONLY, AdminPermission.FIRST_SPAWN)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
// Register the setfirstspawn command
|
// Register the setfirstspawn command
|
||||||
CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new SetFirstSpawnCommand())
|
.executableCommand(new SetFirstSpawnCommand())
|
||||||
@ -242,7 +240,8 @@ public final class CommandInitializer {
|
|||||||
CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new PurgeLastPositionCommand())
|
.executableCommand(new PurgeLastPositionCommand())
|
||||||
.parent(AUTHME_BASE)
|
.parent(AUTHME_BASE)
|
||||||
.labels("resetpos", "purgelastposition", "purgelastpos", "resetposition", "resetlastposition", "resetlastpos")
|
.labels("resetpos", "purgelastposition", "purgelastpos", "resetposition",
|
||||||
|
"resetlastposition", "resetlastpos")
|
||||||
.description("Purge player's last position")
|
.description("Purge player's last position")
|
||||||
.detailedDescription("Purge the last know position of the specified player.")
|
.detailedDescription("Purge the last know position of the specified player.")
|
||||||
.permissions(OP_ONLY, AdminPermission.PURGE_LAST_POSITION)
|
.permissions(OP_ONLY, AdminPermission.PURGE_LAST_POSITION)
|
||||||
@ -250,7 +249,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the purgebannedplayers command
|
// Register the purgebannedplayers command
|
||||||
CommandDescription purgeBannedPlayersCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new PurgeBannedPlayersCommand())
|
.executableCommand(new PurgeBannedPlayersCommand())
|
||||||
.parent(AUTHME_BASE)
|
.parent(AUTHME_BASE)
|
||||||
.labels("purgebannedplayers", "purgebannedplayer", "deletebannedplayers", "deletebannedplayer")
|
.labels("purgebannedplayers", "purgebannedplayer", "deletebannedplayers", "deletebannedplayer")
|
||||||
@ -260,7 +259,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the switchantibot command
|
// Register the switchantibot command
|
||||||
CommandDescription switchAntiBotCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new SwitchAntiBotCommand())
|
.executableCommand(new SwitchAntiBotCommand())
|
||||||
.parent(AUTHME_BASE)
|
.parent(AUTHME_BASE)
|
||||||
.labels("switchantibot", "toggleantibot", "antibot")
|
.labels("switchantibot", "toggleantibot", "antibot")
|
||||||
@ -270,26 +269,13 @@ public final class CommandInitializer {
|
|||||||
.withArgument("mode", "ON / OFF", true)
|
.withArgument("mode", "ON / OFF", true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// // Register the resetname command
|
|
||||||
// CommandDescription resetNameCommand = new CommandDescription(
|
|
||||||
// new ResetNameCommand(),
|
|
||||||
// new ArrayList<String>() {{
|
|
||||||
// add("resetname");
|
|
||||||
// add("resetnames");
|
|
||||||
// }},
|
|
||||||
// "Reset name",
|
|
||||||
// "Reset name",
|
|
||||||
// authMeCommand);
|
|
||||||
// resetNameCommand.setCommandPermissions("authme.admin.resetname",
|
|
||||||
// CommandPermissions.DefaultPermission.OP_ONLY);
|
|
||||||
|
|
||||||
// Register the reload command
|
// Register the reload command
|
||||||
CommandDescription reloadCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new ReloadCommand())
|
.executableCommand(new ReloadCommand())
|
||||||
.parent(AUTHME_BASE)
|
.parent(AUTHME_BASE)
|
||||||
.labels("reload", "rld")
|
.labels("reload", "rld")
|
||||||
.description("Reload plugin")
|
.description("Reload plugin")
|
||||||
.detailedDescription("Reload the AutheMeReloaded plugin.")
|
.detailedDescription("Reload the AuthMeReloaded plugin.")
|
||||||
.permissions(OP_ONLY, AdminPermission.RELOAD)
|
.permissions(OP_ONLY, AdminPermission.RELOAD)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -315,7 +301,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription loginHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(LOGIN_BASE)
|
.parent(LOGIN_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -335,7 +321,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription logoutHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(LOGOUT_BASE)
|
.parent(LOGOUT_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -357,7 +343,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription registerHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(REGISTER_BASE)
|
.parent(REGISTER_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -378,7 +364,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription unregisterHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(UNREGISTER_BASE)
|
.parent(UNREGISTER_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -400,7 +386,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription changePasswordHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(CHANGE_PASSWORD_BASE)
|
.parent(CHANGE_PASSWORD_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -419,7 +405,7 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription emailHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(EMAIL_BASE)
|
.parent(EMAIL_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -429,24 +415,24 @@ public final class CommandInitializer {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the add command
|
// Register the add command
|
||||||
CommandDescription addEmailCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new AddEmailCommand())
|
.executableCommand(new AddEmailCommand())
|
||||||
.parent(EMAIL_BASE)
|
.parent(EMAIL_BASE)
|
||||||
.labels("add", "addemail", "addmail")
|
.labels("add", "addemail", "addmail")
|
||||||
.description("Add Email")
|
.description("Add Email")
|
||||||
.detailedDescription("Add a new Email address to your account.")
|
.detailedDescription("Add a new email address to your account.")
|
||||||
.permissions(ALLOWED, PlayerPermission.ADD_EMAIL)
|
.permissions(ALLOWED, PlayerPermission.ADD_EMAIL)
|
||||||
.withArgument("email", "Email address", false)
|
.withArgument("email", "Email address", false)
|
||||||
.withArgument("verifyEmail", "Email address verification", false)
|
.withArgument("verifyEmail", "Email address verification", false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the change command
|
// Register the change command
|
||||||
CommandDescription changeEmailCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new ChangeEmailCommand())
|
.executableCommand(new ChangeEmailCommand())
|
||||||
.parent(EMAIL_BASE)
|
.parent(EMAIL_BASE)
|
||||||
.labels("change", "changeemail", "changemail")
|
.labels("change", "changeemail", "changemail")
|
||||||
.description("Change Email")
|
.description("Change Email")
|
||||||
.detailedDescription("Change an Email address of your account.")
|
.detailedDescription("Change an email address of your account.")
|
||||||
.permissions(ALLOWED, PlayerPermission.CHANGE_EMAIL)
|
.permissions(ALLOWED, PlayerPermission.CHANGE_EMAIL)
|
||||||
.withArgument("oldEmail", "Old email address", false)
|
.withArgument("oldEmail", "Old email address", false)
|
||||||
.withArgument("newEmail", "New email address", false)
|
.withArgument("newEmail", "New email address", false)
|
||||||
@ -454,12 +440,13 @@ public final class CommandInitializer {
|
|||||||
|
|
||||||
|
|
||||||
// Register the recover command
|
// Register the recover command
|
||||||
CommandDescription recoverEmailCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(new RecoverEmailCommand())
|
.executableCommand(new RecoverEmailCommand())
|
||||||
.parent(EMAIL_BASE)
|
.parent(EMAIL_BASE)
|
||||||
.labels("recover", "recovery", "recoveremail", "recovermail")
|
.labels("recover", "recovery", "recoveremail", "recovermail")
|
||||||
.description("Recover password using Email")
|
.description("Recover password using Email")
|
||||||
.detailedDescription("Recover your account using an Email address by sending a mail containing a new password.")
|
.detailedDescription("Recover your account using an Email address by sending a mail containing " +
|
||||||
|
"a new password.")
|
||||||
.permissions(ALLOWED, PlayerPermission.RECOVER_EMAIL)
|
.permissions(ALLOWED, PlayerPermission.RECOVER_EMAIL)
|
||||||
.withArgument("email", "Email address", false)
|
.withArgument("email", "Email address", false)
|
||||||
.build();
|
.build();
|
||||||
@ -470,13 +457,13 @@ public final class CommandInitializer {
|
|||||||
.parent(null)
|
.parent(null)
|
||||||
.labels("captcha", "capt")
|
.labels("captcha", "capt")
|
||||||
.description("Captcha Command")
|
.description("Captcha Command")
|
||||||
.detailedDescription("Captcha command for AuthMeRelaoded.")
|
.detailedDescription("Captcha command for AuthMeReloaded.")
|
||||||
.permissions(ALLOWED, PlayerPermission.CAPTCHA)
|
.permissions(ALLOWED, PlayerPermission.CAPTCHA)
|
||||||
.withArgument("captcha", "The Captcha", false)
|
.withArgument("captcha", "The Captcha", false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription captchaHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(CAPTCHA_BASE)
|
.parent(CAPTCHA_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
@ -491,13 +478,14 @@ public final class CommandInitializer {
|
|||||||
.parent(null)
|
.parent(null)
|
||||||
.labels("converter", "convert", "conv")
|
.labels("converter", "convert", "conv")
|
||||||
.description("Converter Command")
|
.description("Converter Command")
|
||||||
.detailedDescription("Converter command for AuthMeRelaoded.")
|
.detailedDescription("Converter command for AuthMeReloaded.")
|
||||||
.permissions(OP_ONLY, AdminPermission.CONVERTER)
|
.permissions(OP_ONLY, AdminPermission.CONVERTER)
|
||||||
.withArgument("job", "Conversion job: flattosql / flattosqlite /| xauth / crazylogin / rakamak / royalauth / vauth / sqltoflat", false)
|
.withArgument("job", "Conversion job: flattosql / flattosqlite /| xauth / crazylogin / rakamak / " +
|
||||||
|
"royalauth / vauth / sqltoflat", false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription converterHelpCommand = CommandDescription.builder()
|
CommandDescription.builder()
|
||||||
.executableCommand(helpCommandExecutable)
|
.executableCommand(helpCommandExecutable)
|
||||||
.parent(CONVERTER_BASE)
|
.parent(CONVERTER_BASE)
|
||||||
.labels(helpCommandLabels)
|
.labels(helpCommandLabels)
|
||||||
|
Loading…
Reference in New Issue
Block a user