Package com.ultikits.ultitools.abstracts
Class AbstractCommand
java.lang.Object
com.ultikits.ultitools.abstracts.AbstractCommand
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
- Direct Known Subclasses:
AbstractConsoleCommandExecutor,AbstractPlayerCommandExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGets the help command.protected voidsendErrorMessage(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command) Sends the error message to the sender of the command.protected abstract voidsendHelpMessage(org.bukkit.command.CommandSender sender) Sends the help message to the sender of the command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.command.CommandExecutor
onCommand
-
Constructor Details
-
AbstractCommand
public AbstractCommand()
-
-
Method Details
-
sendHelpMessage
protected abstract void sendHelpMessage(org.bukkit.command.CommandSender sender) Sends the help message to the sender of the command.- Parameters:
sender- the sender of the command
-
sendErrorMessage
protected void sendErrorMessage(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command) Sends the error message to the sender of the command.- Parameters:
sender- the sender of the commandcommand- the command which was executed
-
getHelpCommand
Gets the help command. For example "warp help" -- if you want to change the help command to "warp h", override this method and make it return "h".- Returns:
- the help command
-