diff --git a/src/main/java/fr/xephi/authme/command/CommandDescription.java b/src/main/java/fr/xephi/authme/command/CommandDescription.java index 115d0f23d..36ad6da6e 100644 --- a/src/main/java/fr/xephi/authme/command/CommandDescription.java +++ b/src/main/java/fr/xephi/authme/command/CommandDescription.java @@ -35,7 +35,7 @@ public class CommandDescription { */ private String detailedDescription; /** - * The executable command instance described by this object. + * The class implementing the command described by this object. */ private Class executableCommand; /** @@ -112,7 +112,7 @@ public class CommandDescription { } /** - * Check whether this command description has a specific command. + * Check whether this command description has the given label. * * @param commandLabel The label to check for. * @@ -128,9 +128,9 @@ public class CommandDescription { } /** - * Return the {@link ExecutableCommand} instance defined by the command description. + * Return the {@link ExecutableCommand} class implementing this command. * - * @return The executable command object. + * @return The executable command class */ public Class getExecutableCommand() { return executableCommand; @@ -139,7 +139,7 @@ public class CommandDescription { /** * Return the parent. * - * @return The parent command, or null for base commands. + * @return The parent command, or null for base commands */ public CommandDescription getParent() { return parent; diff --git a/src/main/java/fr/xephi/authme/command/CommandHandler.java b/src/main/java/fr/xephi/authme/command/CommandHandler.java index 0b76a8222..da5299e22 100644 --- a/src/main/java/fr/xephi/authme/command/CommandHandler.java +++ b/src/main/java/fr/xephi/authme/command/CommandHandler.java @@ -16,8 +16,8 @@ import java.util.Map; import java.util.Set; /** - * The AuthMe command handler, responsible for mapping incoming commands to the correct {@link CommandDescription} - * or to display help messages for unknown invocations. + * The AuthMe command handler, responsible for invoking the correct {@link ExecutableCommand} based on incoming + * command labels or for displaying a help message for unknown command labels. */ public class CommandHandler { @@ -88,7 +88,7 @@ public class CommandHandler { } /** - * Initializes all required ExecutableCommand objects. + * Initialize all required ExecutableCommand objects. * * @param commandClasses the classes to instantiate */ diff --git a/src/main/java/fr/xephi/authme/command/CommandMapper.java b/src/main/java/fr/xephi/authme/command/CommandMapper.java index d0706c80b..44d5b5833 100644 --- a/src/main/java/fr/xephi/authme/command/CommandMapper.java +++ b/src/main/java/fr/xephi/authme/command/CommandMapper.java @@ -17,8 +17,7 @@ import static fr.xephi.authme.command.FoundResultStatus.MISSING_BASE_COMMAND; import static fr.xephi.authme.command.FoundResultStatus.UNKNOWN_LABEL; /** - * The AuthMe command handler, responsible for mapping incoming - * command parts to the correct {@link CommandDescription}. + * Maps incoming command parts to the correct {@link CommandDescription}. */ public class CommandMapper { @@ -159,7 +158,7 @@ public class CommandMapper { private static FoundCommandResult transformResultForHelp(FoundCommandResult result) { if (result.getCommandDescription() != null - && HELP_COMMAND_CLASS.isAssignableFrom(result.getCommandDescription().getExecutableCommand())) { + && HELP_COMMAND_CLASS == result.getCommandDescription().getExecutableCommand()) { // For "/authme help register" we have labels = [authme, help] and arguments = [register] // But for the help command we want labels = [authme, help] and arguments = [authme, register], // so we can use the arguments as the labels to the command to show help for