com.quartercode.quarterbukkit.api.command
Class Command

java.lang.Object
  extended by com.quartercode.quarterbukkit.api.command.Command

public class Command
extends java.lang.Object

This class represents a typed command with different components.


Constructor Summary
Command(org.bukkit.command.CommandSender sender, java.lang.String globalLabel, java.lang.String label, java.lang.String... arguments)
          Creates a new command representing object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String[] getArguments()
          Returns the parsed arguments of the command as a String-array.
 java.lang.String getGlobalLabel()
          Returns the global label of the command.
 java.lang.String getLabel()
          Returns the secondary label of the command.
 org.bukkit.command.CommandSender getSender()
          Returns the CommandSender of the command.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Command

public Command(org.bukkit.command.CommandSender sender,
               java.lang.String globalLabel,
               java.lang.String label,
               java.lang.String... arguments)
Creates a new command representing object.

Parameters:
sender - The CommandSender of the command.
globalLabel - The global label of the command.
label - The secondary label of the command.
arguments - The parsed arguments of the command as a String-array.
Method Detail

getSender

public org.bukkit.command.CommandSender getSender()
Returns the CommandSender of the command.

Returns:
The CommandSender.

getGlobalLabel

public java.lang.String getGlobalLabel()
Returns the global label of the command. If you type in /command help, command will be the global label.

Returns:
The global label of the command.

getLabel

public java.lang.String getLabel()
Returns the secondary label of the command. If you type in /command help, help will be the secondary label.

Returns:
The secondary label of the command.

getArguments

public java.lang.String[] getArguments()
Returns the parsed arguments of the command as a String-array. If you type in /command help 2, the array will only contains [2].

Returns:
The parsed arguments of the command.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object