Class AbstractPlayerCommandExecutor

java.lang.Object
com.ultikits.ultitools.abstracts.AbstractCommand
com.ultikits.ultitools.abstracts.AbstractPlayerCommandExecutor
All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Direct Known Subclasses:
AbstractTabExecutor

public abstract class AbstractPlayerCommandExecutor extends AbstractCommand
Abstract class representing a player command executor.
See Also:
  • CommandExecutor
  • Constructor Details

    • AbstractPlayerCommandExecutor

      public AbstractPlayerCommandExecutor()
  • Method Details

    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, String s, String[] strings)
      Parameters:
      commandSender - the sender of the command
      command - the command which was executed
      s - the alias of the command which was used
      strings - the arguments passed to the command, split by spaces
      Returns:
      whether the command was executed successfully
      See Also:
      • CommandExecutor.onCommand(CommandSender, Command, String, String[])
    • onPlayerCommand

      protected abstract boolean onPlayerCommand(org.bukkit.command.Command command, String[] strings, org.bukkit.entity.Player player)
      Executes the given command, returning its success
      Parameters:
      command - the command which was executed
      strings - the arguments passed to the command, split by spaces
      player - the player who executed the command
      Returns:
      whether the command was executed successfully