Remove ALL perm node from command initializer; JavaDoc householding

This commit is contained in:
ljacqu 2015-12-05 21:10:09 +01:00
parent 7c36f087fc
commit 90a04e477a
2 changed files with 26 additions and 25 deletions

View File

@ -90,7 +90,7 @@ public final class CommandInitializer {
.detailedDescription("Register the specified player with the specified password.") .detailedDescription("Register the specified player with the specified password.")
.withArgument("player", "Player name", false) .withArgument("player", "Player name", false)
.withArgument("password", "Password", false) .withArgument("password", "Password", false)
.permissions(OP_ONLY, AdminPermission.REGISTER, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.REGISTER)
.executableCommand(new RegisterAdminCommand()) .executableCommand(new RegisterAdminCommand())
.build(); .build();
@ -101,7 +101,7 @@ public final class CommandInitializer {
.description("Unregister a player") .description("Unregister a player")
.detailedDescription("Unregister the specified player.") .detailedDescription("Unregister the specified player.")
.withArgument("player", "Player name", false) .withArgument("player", "Player name", false)
.permissions(OP_ONLY, AdminPermission.UNREGISTER, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.UNREGISTER)
.executableCommand(new UnregisterAdminCommand()) .executableCommand(new UnregisterAdminCommand())
.build(); .build();
@ -112,7 +112,7 @@ public final class CommandInitializer {
.description("Enforce login player") .description("Enforce login player")
.detailedDescription("Enforce the specified player to login.") .detailedDescription("Enforce the specified player to login.")
.withArgument("player", "Online player name", true) .withArgument("player", "Online player name", true)
.permissions(OP_ONLY, PlayerPermission.CAN_LOGIN_BE_FORCED, AdminPermission.ALL) .permissions(OP_ONLY, PlayerPermission.CAN_LOGIN_BE_FORCED)
.executableCommand(new ForceLoginCommand()) .executableCommand(new ForceLoginCommand())
.build(); .build();
@ -124,7 +124,7 @@ public final class CommandInitializer {
.detailedDescription("Change the password of a player.") .detailedDescription("Change the password of a player.")
.withArgument("player", "Player name", false) .withArgument("player", "Player name", false)
.withArgument("pwd", "New password", false) .withArgument("pwd", "New password", false)
.permissions(OP_ONLY, AdminPermission.CHANGE_PASSWORD, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.CHANGE_PASSWORD)
.executableCommand(new ChangePasswordAdminCommand()) .executableCommand(new ChangePasswordAdminCommand())
.build(); .build();
@ -135,7 +135,7 @@ public final class CommandInitializer {
.description("Player's last login") .description("Player's last login")
.detailedDescription("View the date of the specified players last login.") .detailedDescription("View the date of the specified players last login.")
.withArgument("player", "Player name", true) .withArgument("player", "Player name", true)
.permissions(OP_ONLY, AdminPermission.LAST_LOGIN, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.LAST_LOGIN)
.executableCommand(new LastLoginCommand()) .executableCommand(new LastLoginCommand())
.build(); .build();
@ -146,7 +146,7 @@ public final class CommandInitializer {
.description("Display player accounts") .description("Display player accounts")
.detailedDescription("Display all accounts of a player by his player name or IP.") .detailedDescription("Display all accounts of a player by his player name or IP.")
.withArgument("player", "Player name or IP", true) .withArgument("player", "Player name or IP", true)
.permissions(OP_ONLY, AdminPermission.ACCOUNTS, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.ACCOUNTS)
.executableCommand(new AccountsCommand()) .executableCommand(new AccountsCommand())
.build(); .build();
@ -156,7 +156,7 @@ public final class CommandInitializer {
.labels("getemail", "getmail", "email", "mail") .labels("getemail", "getmail", "email", "mail")
.description("Display player's email") .description("Display player's email")
.detailedDescription("Display the email address of the specified player if set.") .detailedDescription("Display the email address of the specified player if set.")
.permissions(OP_ONLY, AdminPermission.GET_EMAIL, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.GET_EMAIL)
.withArgument("player", "Player name", true) .withArgument("player", "Player name", true)
.executableCommand(new GetEmailCommand()) .executableCommand(new GetEmailCommand())
.build(); .build();
@ -168,7 +168,7 @@ public final class CommandInitializer {
.labels("chgemail", "chgmail", "setemail", "setmail") .labels("chgemail", "chgmail", "setemail", "setmail")
.description("Change player's email") .description("Change player's email")
.detailedDescription("Change the email address of the specified player.") .detailedDescription("Change the email address of the specified player.")
.permissions(OP_ONLY, AdminPermission.CHANGE_EMAIL, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.CHANGE_EMAIL)
.withArgument("player", "Player name", false) .withArgument("player", "Player name", false)
.withArgument("email", "Player email", false) .withArgument("email", "Player email", false)
.build(); .build();
@ -180,7 +180,7 @@ public final class CommandInitializer {
.labels("getip", "ip") .labels("getip", "ip")
.description("Get player's IP") .description("Get player's IP")
.detailedDescription("Get the IP address of the specified online player.") .detailedDescription("Get the IP address of the specified online player.")
.permissions(OP_ONLY, AdminPermission.GET_IP, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.GET_IP)
.withArgument("player", "Player Name", false) .withArgument("player", "Player Name", false)
.build(); .build();
@ -192,7 +192,7 @@ public final class CommandInitializer {
.labels("spawn", "home") .labels("spawn", "home")
.description("Teleport to spawn") .description("Teleport to spawn")
.detailedDescription("Teleport to the spawn.") .detailedDescription("Teleport to the spawn.")
.permissions(OP_ONLY, AdminPermission.SPAWN, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.SPAWN)
.withArgument("player", "Player Name", false) .withArgument("player", "Player Name", false)
.build(); .build();
@ -203,7 +203,7 @@ public final class CommandInitializer {
.labels("setspawn", "chgspawn") .labels("setspawn", "chgspawn")
.description("Change the spawn") .description("Change the spawn")
.detailedDescription("Change the player's spawn to your current position.") .detailedDescription("Change the player's spawn to your current position.")
.permissions(OP_ONLY, AdminPermission.SET_SPAWN, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.SET_SPAWN)
.build(); .build();
// Register the firstspawn command // Register the firstspawn command
@ -213,7 +213,7 @@ public final class CommandInitializer {
.labels("firstspawn", "firsthome") .labels("firstspawn", "firsthome")
.description("Teleport to first spawn") .description("Teleport to first spawn")
.detailedDescription("Teleport to the first spawn.") .detailedDescription("Teleport to the first spawn.")
.permissions(OP_ONLY, AdminPermission.FIRST_SPAWN, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.FIRST_SPAWN)
.build(); .build();
@ -224,7 +224,7 @@ public final class CommandInitializer {
.labels("setfirstspawn", "chgfirstspawn") .labels("setfirstspawn", "chgfirstspawn")
.description("Change the first spawn") .description("Change the first spawn")
.detailedDescription("Change the first player's spawn to your current position.") .detailedDescription("Change the first player's spawn to your current position.")
.permissions(OP_ONLY, AdminPermission.SET_FIRST_SPAWN, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.SET_FIRST_SPAWN)
.build(); .build();
// Register the purge command // Register the purge command
@ -234,7 +234,7 @@ public final class CommandInitializer {
.labels("purge", "delete") .labels("purge", "delete")
.description("Purge old data") .description("Purge old data")
.detailedDescription("Purge old AuthMeReloaded data longer than the specified amount of days ago.") .detailedDescription("Purge old AuthMeReloaded data longer than the specified amount of days ago.")
.permissions(OP_ONLY, AdminPermission.PURGE, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.PURGE)
.withArgument("days", "Number of days", false) .withArgument("days", "Number of days", false)
.build(); .build();
@ -245,7 +245,7 @@ public final class CommandInitializer {
.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, AdminPermission.ALL) .permissions(OP_ONLY, AdminPermission.PURGE_LAST_POSITION)
.withArgument("player", "Player name", false) .withArgument("player", "Player name", false)
.build(); .build();
@ -310,7 +310,7 @@ public final class CommandInitializer {
.description("Login command") .description("Login command")
.detailedDescription("Command to log in using AuthMeReloaded.") .detailedDescription("Command to log in using AuthMeReloaded.")
.parent(null) .parent(null)
.permissions(ALLOWED, PlayerPermission.LOGIN, PlayerPermission.ALL_COMMANDS) .permissions(ALLOWED, PlayerPermission.LOGIN)
.withArgument("password", "Login password", false) .withArgument("password", "Login password", false)
.build(); .build();
@ -340,7 +340,7 @@ public final class CommandInitializer {
.detailedDescription("Command to register using AuthMeReloaded.") .detailedDescription("Command to register using AuthMeReloaded.")
.withArgument("password", "Password", false) .withArgument("password", "Password", false)
.withArgument("verifyPassword", "Verify password", false) .withArgument("verifyPassword", "Verify password", false)
.permissions(ALLOWED, PlayerPermission.REGISTER, PlayerPermission.ALL_COMMANDS) .permissions(ALLOWED, PlayerPermission.REGISTER)
.executableCommand(new RegisterCommand()) .executableCommand(new RegisterCommand())
.build(); .build();

View File

@ -26,27 +26,27 @@ public enum AdminPermission implements PermissionNode {
CHANGE_PASSWORD("authme.command.admin.changepassword"), CHANGE_PASSWORD("authme.command.admin.changepassword"),
/** /**
* Administrator command to see the last login date and time of an user. * Administrator command to see the last login date and time of a user.
*/ */
LAST_LOGIN("authme.command.admin.lastlogin"), LAST_LOGIN("authme.command.admin.lastlogin"),
/** /**
* Administrator command to see all accounts associated with an user. * Administrator command to see all accounts associated with a user.
*/ */
ACCOUNTS("authme.command.admin.accounts"), ACCOUNTS("authme.command.admin.accounts"),
/** /**
* Administrator command to get the email address of an user, if set. * Administrator command to get the email address of a user, if set.
*/ */
GET_EMAIL("authme.command.admin.getemail"), GET_EMAIL("authme.command.admin.getemail"),
/** /**
* Administrator command to set or change the email adress of an user. * Administrator command to set or change the email address of a user.
*/ */
CHANGE_EMAIL("authme.command.admin.changemail"), CHANGE_EMAIL("authme.command.admin.changemail"),
/** /**
* Administrator command to get the last known IP of an user. * Administrator command to get the last known IP of a user.
*/ */
GET_IP("authme.command.admin.getip"), GET_IP("authme.command.admin.getip"),
@ -76,7 +76,7 @@ public enum AdminPermission implements PermissionNode {
PURGE("authme.command.admin.purge"), PURGE("authme.command.admin.purge"),
/** /**
* Administrator command to purge the last position of an user. * Administrator command to purge the last position of a user.
*/ */
PURGE_LAST_POSITION("authme.command.admin.purgelastpos"), PURGE_LAST_POSITION("authme.command.admin.purgelastpos"),
@ -101,7 +101,7 @@ public enum AdminPermission implements PermissionNode {
RELOAD("authme.command.admin.reload"), RELOAD("authme.command.admin.reload"),
/** /**
* Give access to all admin commands * Give access to all admin commands.
*/ */
ALL("authme.command.admin.*"); ALL("authme.command.admin.*");
@ -112,7 +112,8 @@ public enum AdminPermission implements PermissionNode {
/** /**
* Get the permission node. * Get the permission node.
* @return *
* @return Permission node.
*/ */
@Override @Override
public String getNode() { public String getNode() {