Class AbstractConsoleCommandExecutor

java.lang.Object
com.ultikits.ultitools.abstracts.AbstractCommand
com.ultikits.ultitools.abstracts.AbstractConsoleCommandExecutor
All Implemented Interfaces:
org.bukkit.command.CommandExecutor

public abstract class AbstractConsoleCommandExecutor extends AbstractCommand
Abstract class representing a console command executor.

控制台指令执行器的抽象类。

See Also:
  • CommandExecutor
  • Constructor Details

    • AbstractConsoleCommandExecutor

      public AbstractConsoleCommandExecutor()
  • 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[])
    • onConsoleCommand

      protected abstract boolean onConsoleCommand(org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, String[] strings)
      Executes the given command, returning its success

      执行给定的指令,返回是否成功

      Parameters:
      commandSender - the sender of the command
      指令发送者
      command - the command which was executed
      被执行的指令
      strings - the arguments passed to the command, split by spaces
      通过空格分割的指令参数
      Returns:
      whether the command was executed successfully
      指令是否执行成功