Class AdvancedCommand
java.lang.Object
de.eldoria.eldoutilities.commands.command.AdvancedCommand
- All Implemented Interfaces:
CommandRoute
- Direct Known Subclasses:
AdvancedCommandAdapter
,DefaultAbout
,DefaultDebug
-
Constructor Summary
ConstructorDescriptionAdvancedCommand
(Plugin plugin) AdvancedCommand
(Plugin plugin, CommandMeta meta) -
Method Summary
Modifier and TypeMethodDescriptionvoid
commandRoute
(CommandSender sender, String label, Arguments args) protected final Player
getPlayerFromSender
(CommandSender sender) Get the player from a sender if the sender is a instance ofPlayer
returns true.void
handleCommandError
(CommandSender sender, Throwable e) protected final ILocalizer
Get a instance of the localizer.protected final MessageSender
Get a instance of the message sender.final CommandMeta
meta()
protected final void
meta
(CommandMeta meta) plugin()
tabCompleteRoute
(CommandSender sender, String label, Arguments args)
-
Constructor Details
-
AdvancedCommand
-
AdvancedCommand
-
-
Method Details
-
commandRoute
public void commandRoute(CommandSender sender, String label, Arguments args) throws CommandException - Specified by:
commandRoute
in interfaceCommandRoute
- Throws:
CommandException
-
tabCompleteRoute
@Nullable public @Nullable List<String> tabCompleteRoute(CommandSender sender, String label, Arguments args) throws CommandException - Specified by:
tabCompleteRoute
in interfaceCommandRoute
- Throws:
CommandException
-
localizer
Get a instance of the localizer.- Returns:
- localizer instance
-
messageSender
Get a instance of the message sender.- Returns:
- message sender instance
-
getPlayerFromSender
Get the player from a sender if the sender is a instance ofPlayer
returns true.- Parameters:
sender
- sender to cast- Returns:
- player or null if sender is not player
-
plugin
-
meta
-
meta
-
handleCommandError
-