Package de.marcely.bedwars.api.command
Interface CommandHandlerWrappedSender
- All Superinterfaces:
CommandHandler
- All Known Implementing Classes:
CollectionCommandHandler
,HelpCommandHandler
A CommandHandler handles the execution of a command that supports
CommandSenderWrapper
.
An alternative to CommandHandler
that allows the usage of CommandSenderWrapper
.
With this, you may permit e.g. players from remote server using this command.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.marcely.bedwars.api.command.CommandHandler
CommandHandler.Silent
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable Integer
getContentAmount
(CommandSenderWrapper sender) A command may display an amount as an additional info in /bw [...] helpdefault @Nullable Integer
getContentAmount
(CommandSender sender) A command may display an amount as an additional info in /bw [...] helponAutocomplete
(CommandSenderWrapper sender, String[] args) Gets called whenever someone autocompletes (presses tab) on the commandonAutocomplete
(CommandSender sender, String[] args) Gets called whenever someone autocompletes (presses tab) on the commandvoid
onFire
(CommandSenderWrapper sender, String fullUsage, String[] args) Gets called whenever someone executes the commanddefault void
onFire
(CommandSender sender, String fullUsage, String[] args) Gets called whenever someone executes the commandMethods inherited from interface de.marcely.bedwars.api.command.CommandHandler
getBukkitLabel, getOverridingUsage, getPlugin, onRegister
-
Method Details
-
onFire
Gets called whenever someone executes the command- Parameters:
sender
- The person who executed the commandfullUsage
- The full usage, including the label and everythingargs
- Passed arguments to this command
-
onFire
Description copied from interface:CommandHandler
Gets called whenever someone executes the command- Specified by:
onFire
in interfaceCommandHandler
- Parameters:
sender
- The person who executed the commandfullUsage
- The full usage, including the label and everythingargs
- Passed arguments to this command
-
onAutocomplete
Gets called whenever someone autocompletes (presses tab) on the command- Parameters:
sender
- The person who did the autocompleteargs
- The given arguments- Returns:
- What shall be shown to the player as options. Returning null will display all players
-
onAutocomplete
Description copied from interface:CommandHandler
Gets called whenever someone autocompletes (presses tab) on the command- Specified by:
onAutocomplete
in interfaceCommandHandler
- Parameters:
sender
- The person who did the autocompleteargs
- The given arguments- Returns:
- What shall be shown to the player as options. Returning null will display all players
-
getContentAmount
A command may display an amount as an additional info in /bw [...] helpIt's optional. It's not required to override it. Keep in mind that
SubCommand.setHasContentAmount(boolean)
must be set to true for it to be actually shown- Parameters:
sender
- The sender to which this amount shall be shown- Returns:
- The amount of entries this (list) command has.
null
if it shouldn't be shown in this event
-
getContentAmount
Description copied from interface:CommandHandler
A command may display an amount as an additional info in /bw [...] helpIt's optional. It's not required to override it. Keep in mind that
SubCommand.setHasContentAmount(boolean)
must be set to true for it to be actually shown- Specified by:
getContentAmount
in interfaceCommandHandler
- Parameters:
sender
- The sender to which this amount shall be shown- Returns:
- The amount of entries this (list) command has.
null
if it shouldn't be shown in this event
-