java.lang.Object
me.github.simonplays15.betterbansystem.bungeecord.CommandHandler

public class CommandHandler extends Object
CommandHandler is responsible for handling commands in the plugin.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommandHandler (net.md_5.bungee.api.plugin.Plugin plugin)
    The CommandHandler class handles the registration of commands for the plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onCommand (@NotNull net.md_5.bungee.api.CommandSender sender, @NotNull net.md_5.bungee.api.plugin.Command command, @NotNull String label, @NotNull String[] args)
    Executes a command.
    onTabComplete (@NotNull net.md_5.bungee.api.CommandSender sender, @NotNull net.md_5.bungee.api.plugin.Command command, @NotNull String[] args)
    Retrieves a list of tab completion options for a given command.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommandHandler

      public CommandHandler (net.md_5.bungee.api.plugin.Plugin plugin)
      The CommandHandler class handles the registration of commands for the plugin.
  • Method Details

    • onCommand

      public boolean onCommand (@NotNull @NotNull net.md_5.bungee.api.CommandSender sender, @NotNull @NotNull net.md_5.bungee.api.plugin.Command command, @NotNull @NotNull String label, @NotNull @NotNull String[] args) throws CommandException
      Executes a command.
      Parameters:
      sender - the command sender
      command - the command being executed
      label - the command label
      args - the command arguments
      Returns:
      true if the command executed successfully, false otherwise
      Throws:
      CommandException
    • onTabComplete

      public Iterable<String> onTabComplete (@NotNull @NotNull net.md_5.bungee.api.CommandSender sender, @NotNull @NotNull net.md_5.bungee.api.plugin.Command command, @NotNull @NotNull String[] args)
      Retrieves a list of tab completion options for a given command.
      Parameters:
      sender - The command sender who initiated the tab completion.
      command - The command being executed.
      args - The arguments provided after the command.
      Returns:
      An Iterable containing possible tab completion options.