Package org.kingdoms.commands
Class KingdomsCommandHandler
java.lang.Object
org.kingdoms.commands.KingdomsCommandHandler
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
public final class KingdomsCommandHandler
extends Object
implements org.bukkit.command.CommandExecutor
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Map<org.kingdoms.locale.Language, Map<String, KingdomsCommand>> protected static Map<Class<? extends KingdomsParentCommand>, KingdomsParentCommand> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommand(org.kingdoms.locale.Language lang, String[] args) static @Unmodifiable @NotNull Map<org.kingdoms.locale.Language, Map<String, KingdomsCommand>> static Map<String, KingdomsCommand> getCommands(org.kingdoms.locale.Language locale) getMainCommandNames(boolean includeHardcoded) static Stringstatic booleanhandle(@NotNull CommandContext ctx) booleanonCommand(@NonNull org.bukkit.command.CommandSender sender, @NonNull org.bukkit.command.Command cmd, @NonNull String label, @NonNull String[] args) static @NotNull CommandContextIf the command is unrecognized,CommandContext.getCommand()will return null.static voidstatic voidreload()static booleanstartsWithKingdomsCommand(String first)
-
Field Details
-
COMMANDS
-
PARENT_INSTANCES
-
-
Constructor Details
-
KingdomsCommandHandler
-
-
Method Details
-
reload
public static void reload() -
registerCommands
public static void registerCommands() -
getCommands
@NotNull public static @Unmodifiable @NotNull Map<org.kingdoms.locale.Language,Map<String, getCommands()KingdomsCommand>> -
getCommands
-
getCommand
public static KingdomsCommandHandler.CommandInformation getCommand(org.kingdoms.locale.Language lang, String[] args) -
parse
@NotNull public static @NotNull CommandContext parse(org.bukkit.command.CommandSender sender, String[] args) If the command is unrecognized,CommandContext.getCommand()will return null. -
handle
-
onCommand
public boolean onCommand(@NonNull org.bukkit.command.CommandSender sender, @NonNull org.bukkit.command.Command cmd, @NonNull String label, @NonNull String[] args) - Specified by:
onCommandin interfaceorg.bukkit.command.CommandExecutor
-
getMainDisplayName
-
getMainCommandNames
-
startsWithKingdomsCommand
-