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
      指令是否执行成功