- All Known Subinterfaces:
Nested Class SummaryModifier and TypeInterfaceDescription
static classThe default command handler that effectively does nothing
Method SummaryModifier and TypeMethodDescription
default StringReturns the name of the command using the given full usage.
default @Nullable IntegerA command may display an amount as an additional info in /bw [...] help
default @Nullable StringOverride the shown usage at certain conditions.Returns the plugin that created this handlerGets called whenever someone autocompletes (presses tab) on the command
voidGets called whenever someone executes the command
voidGets called whenever the command is getting added as handler
getPluginPlugin getPlugin()Returns the plugin that created this handler
- The plugin of this handler
(SubCommand cmd)Gets called whenever the command is getting added as handler
cmd- The command to which the handler has been added to
getOverridingUsageOverride the shown usage at certain conditions.
By overriding this method, you may replace
SubCommand.getUsage()with something different. E.g. some parameters may require some permissions.
senderWrapper- The sender of the command
- The overriding usage.
nullif there is no overriding usage
onFireGets called whenever someone executes the command
sender- The person who executed the command
fullUsage- The full usage, including the label and everything
args- Passed arguments to this command
onAutocompleteGets called whenever someone autocompletes (presses tab) on the command
sender- The person who did the autocomplete
args- The given arguments
- What shall be shown to the player as options. Returning null will display all players
getContentAmountA command may display an amount as an additional info in /bw [...] help
It'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
sender- The sender to which this amount shall be shown
- The amount of entries this (list) command has.
nullif it shouldn't be shown in this event
getBukkitLabelReturns the name of the command using the given full usage.
Example: With "/bw arena" this method returns "bw"
fullUsage- The full usage that's being passed in
onFire(CommandSender, String, String)
- The name of the command that was used to execute the command