Class AbstractCommand

java.lang.Object
com.ultikits.ultitools.abstracts.AbstractCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Direct Known Subclasses:
AbstractConsoleCommandExecutor, AbstractPlayerCommandExecutor

public abstract class AbstractCommand extends Object implements org.bukkit.command.CommandExecutor
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Gets the help command.
    protected void
    sendErrorMessage(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command)
    Sends the error message to the sender of the command.
    protected abstract void
    sendHelpMessage(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, wait

    Methods 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 command
      command - the command which was executed
    • getHelpCommand

      protected String 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