Fix minor checkstyle issues
- Add JavaDoc where checkstyle expects it - Fix line too long issues - ...
This commit is contained in:
@@ -20,6 +20,9 @@ import static fr.xephi.authme.command.help.HelpProvider.SHOW_CHILDREN;
|
||||
import static fr.xephi.authme.command.help.HelpProvider.SHOW_COMMAND;
|
||||
import static fr.xephi.authme.command.help.HelpProvider.SHOW_DESCRIPTION;
|
||||
|
||||
/**
|
||||
* Displays help information to a user.
|
||||
*/
|
||||
public class HelpCommand implements ExecutableCommand {
|
||||
|
||||
@Inject
|
||||
@@ -51,7 +54,8 @@ public class HelpCommand implements ExecutableCommand {
|
||||
|
||||
int mappedCommandLevel = result.getCommandDescription().getLabelCount();
|
||||
if (mappedCommandLevel == 1) {
|
||||
helpProvider.outputHelp(sender, result, SHOW_COMMAND | SHOW_DESCRIPTION | SHOW_CHILDREN | SHOW_ALTERNATIVES);
|
||||
helpProvider.outputHelp(sender, result,
|
||||
SHOW_COMMAND | SHOW_DESCRIPTION | SHOW_CHILDREN | SHOW_ALTERNATIVES);
|
||||
} else {
|
||||
helpProvider.outputHelp(sender, result, ALL_OPTIONS);
|
||||
}
|
||||
|
||||
@@ -68,6 +68,17 @@ class TestEmailSender implements DebugSection {
|
||||
return DebugSectionPermissions.TEST_EMAIL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the email address to use based on the sender and the arguments. If the arguments are empty,
|
||||
* we attempt to retrieve the email from the sender. If there is an argument, we verify that it is
|
||||
* an email address.
|
||||
* {@code null} is returned if no email address could be found. This method informs the sender of
|
||||
* the specific error in such cases.
|
||||
*
|
||||
* @param sender the command sender
|
||||
* @param arguments the provided arguments
|
||||
* @return the email to use, or null if none found
|
||||
*/
|
||||
private String getEmail(CommandSender sender, List<String> arguments) {
|
||||
if (arguments.isEmpty()) {
|
||||
DataSourceResult<String> emailResult = dataSource.getEmail(sender.getName());
|
||||
|
||||
@@ -97,6 +97,15 @@ public class RegisterCommand extends PlayerCommand {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies that the second argument is valid (based on the configuration)
|
||||
* to perform a password registration. The player is informed if the check
|
||||
* is unsuccessful.
|
||||
*
|
||||
* @param player the player to register
|
||||
* @param arguments the provided arguments
|
||||
* @return true if valid, false otherwise
|
||||
*/
|
||||
private boolean isSecondArgValidForPasswordRegistration(Player player, List<String> arguments) {
|
||||
RegisterSecondaryArgument secondArgType = commonService.getProperty(REGISTER_SECOND_ARGUMENT);
|
||||
// cases where args.size < 2
|
||||
@@ -143,6 +152,15 @@ public class RegisterCommand extends PlayerCommand {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies that the second argument is valid (based on the configuration)
|
||||
* to perform an email registration. The player is informed if the check
|
||||
* is unsuccessful.
|
||||
*
|
||||
* @param player the player to register
|
||||
* @param arguments the provided arguments
|
||||
* @return true if valid, false otherwise
|
||||
*/
|
||||
private boolean isSecondArgValidForEmailRegistration(Player player, List<String> arguments) {
|
||||
RegisterSecondaryArgument secondArgType = commonService.getProperty(REGISTER_SECOND_ARGUMENT);
|
||||
// cases where args.size < 2
|
||||
|
||||
Reference in New Issue
Block a user