Split command management into initializer and handler
- Create Initializer class that only initializes AuthMe commands - Move remaining method to CommandHandler - Deprecate constructors on CommandDescription in favor of the builder - Various cleanups and comments
This commit is contained in:
@@ -37,9 +37,9 @@ public class HelpProvider {
|
||||
*/
|
||||
public static void showHelp(CommandSender sender, CommandParts reference, CommandParts helpQuery, boolean showCommand, boolean showDescription, boolean showArguments, boolean showPermissions, boolean showAlternatives, boolean showCommands) {
|
||||
// Find the command for this help query, one with and one without a prefixed base command
|
||||
FoundCommandResult result = AuthMe.getInstance().getCommandHandler().getCommandManager().findCommand(new CommandParts(helpQuery.getList()));
|
||||
FoundCommandResult result = AuthMe.getInstance().getCommandHandler().findCommand(new CommandParts(helpQuery.getList()));
|
||||
CommandParts commandReferenceOther = new CommandParts(reference.get(0), helpQuery.getList());
|
||||
FoundCommandResult resultOther = AuthMe.getInstance().getCommandHandler().getCommandManager().findCommand(commandReferenceOther);
|
||||
FoundCommandResult resultOther = AuthMe.getInstance().getCommandHandler().findCommand(commandReferenceOther);
|
||||
if (resultOther != null) {
|
||||
if (result == null)
|
||||
result = resultOther;
|
||||
|
||||
Reference in New Issue
Block a user