Package net.winmister332.libs.commands
Class Command
java.lang.Object
net.winmister332.libs.commands.Command
- Direct Known Subclasses:
BukkitCommand
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidchangeName(String newName) final String[]Gets any alternate names or aliases that are associated with the command.final CommandDatagetData()Gets the underlying data associated with the command that was passed to the CTOR.final StringGets the description of the command.final StringgetName()The name of the command.final booleanisHidden()If true the command is hidden from the custom help command.abstract booleanRuns when a command is executed by the @see CommandInvokerfinal voidsetHidden(boolean hide)
-
Constructor Details
-
Command
-
-
Method Details
-
getData
Gets the underlying data associated with the command that was passed to the CTOR.- Returns:
- The @see CommandData associated with the command.
-
getName
The name of the command.- Returns:
- A @see String representing the name of the command.
-
getDescription
Gets the description of the command.- Returns:
- A @see String representing the description of the command.
-
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
-
onInvoke
Runs when a command is executed by the @see CommandInvoker- Parameters:
e- The properties of the command.- Returns:
- True if the command executed normally.
-