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 commandcommand- the command which was executeds- the alias of the command which was usedstrings- 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 executedstrings- the arguments passed to the command, split by spacesplayer- the player who executed the command- Returns:
- whether the command was executed successfully
-