Class CollectionCommandHandler

java.lang.Object
de.marcely.bedwars.api.command.CollectionCommandHandler
All Implemented Interfaces:
CommandHandler, CommandHandlerWrappedSender

public class CollectionCommandHandler extends Object implements CommandHandlerWrappedSender
The default handler of a CommandsCollection
  • Constructor Details

    • CollectionCommandHandler

      public CollectionCommandHandler()
  • Method Details

    • getPlugin

      public Plugin getPlugin()
      Description copied from interface: CommandHandler
      Returns the plugin that created this handler
      Specified by:
      getPlugin in interface CommandHandler
      Returns:
      The plugin of this handler
    • onRegister

      public void onRegister(SubCommand collection)
      Description copied from interface: CommandHandler
      Gets called whenever the command is getting added as handler
      Specified by:
      onRegister in interface CommandHandler
      Parameters:
      collection - The command to which the handler has been added to
    • onFire

      public void onFire(CommandSenderWrapper sender, String fullUsage, String[] args)
      Description copied from interface: CommandHandlerWrappedSender
      Gets called whenever someone executes the command
      Specified by:
      onFire in interface CommandHandlerWrappedSender
      Parameters:
      sender - The person who executed the command
      fullUsage - The full usage, including the label and everything
      args - Passed arguments to this command
    • onAutocomplete

      @Nullable public @Nullable List<String> onAutocomplete(CommandSenderWrapper sender, String[] args)
      Description copied from interface: CommandHandlerWrappedSender
      Gets called whenever someone autocompletes (presses tab) on the command
      Specified by:
      onAutocomplete in interface CommandHandlerWrappedSender
      Parameters:
      sender - The person who did the autocomplete
      args - The given arguments
      Returns:
      What shall be shown to the player as options. Returning null will display all players