Package com.ultikits.ultitools.abstracts
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
Abstract class representing a player 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 booleanonPlayerCommand(org.bukkit.command.Command command, String[] strings, org.bukkit.entity.Player player) Executes the given command, returning its successMethods inherited from class com.ultikits.ultitools.abstracts.AbstractCommand
getHelpCommand, sendErrorMessage, sendHelpMessage
-
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:
-
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
指令是否执行成功
-