Class Command

java.lang.Object
net.winmister332.libs.commands.Command
Direct Known Subclasses:
BukkitCommand

public abstract class Command extends Object
This class is the base of every WMCommand. The @see CommandForwarder and @see BukkitCommand creates a dynamic instance of this class for a bukkit command. NOTE: Overriding default commands in-favor of WMCommands is neither tested nor supported at this time.
  • Constructor Details

  • Method Details

    • getData

      public final CommandData getData()
      Gets the underlying data associated with the command that was passed to the CTOR.
      Returns:
      The @see CommandData associated with the command.
    • getName

      public final String getName()
      The name of the command.
      Returns:
      A @see String representing the name of the command.
    • getDescription

      public final String getDescription()
      Gets the description of the command.
      Returns:
      A @see String representing the description of the command.
    • getAliases

      public final String[] getAliases()
      Gets any alternate names or aliases that are associated with the command.
      Returns:
      A @see String[] of alternate names the command instance will accept.
    • isHidden

      public final boolean isHidden()
      If true the command is hidden from the custom help command.
      Returns:
      See Also:
      • boolean
    • setHidden

      public final void setHidden(boolean hide)
    • changeName

      public final void changeName(String newName)
    • onInvoke

      public abstract boolean onInvoke(CommandProperties e)
      Runs when a command is executed by the @see CommandInvoker
      Parameters:
      e - The properties of the command.
      Returns:
      True if the command executed normally.