Package com.ultikits.ultitools.abstracts
Class AbstractConsoleCommandExecutor
java.lang.Object
com.ultikits.ultitools.abstracts.AbstractCommand
com.ultikits.ultitools.abstracts.AbstractConsoleCommandExecutor
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Abstract class representing a console command executor.
控制台指令执行器的抽象类。
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanonCommand(org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, String s, String[] strings) protected abstract booleanonConsoleCommand(org.bukkit.command.CommandSender commandSender, org.bukkit.command.Command command, String[] strings) Executes the given command, returning its successMethods inherited from class com.ultikits.ultitools.abstracts.AbstractCommand
getHelpCommand, sendErrorMessage, sendHelpMessage
-
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:
-
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
指令是否执行成功
-