com.quartercode.quarterbukkit.api.command
Class CommandInfo

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

public class CommandInfo
extends java.lang.Object

Class for storing some information about a Command.


Constructor Summary
CommandInfo(boolean ignoreCase, java.lang.String parameterUsage, java.lang.String description, java.lang.String permission, java.lang.String... labels)
          Creates a new information-object and sets all the information.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDescription()
          Returns a short description what the Command does.
 java.lang.String[] getLabels()
          Returns all labels a user can use for the Command.
 java.lang.String getParameterUsage()
          Returns how to use the parameters of the Command (returns null if there aren't parameters).
 java.lang.String getPermission()
          Returns the permission you need to execute the Command.
 int hashCode()
           
 boolean isIgnoreCase()
          Returns if the CommandExecutor should ignore the case of the label.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandInfo

public CommandInfo(boolean ignoreCase,
                   java.lang.String parameterUsage,
                   java.lang.String description,
                   java.lang.String permission,
                   java.lang.String... labels)
Creates a new information-object and sets all the information. This should only be called by CommandHandlers in their CommandHandler.getInfo()-method.

Parameters:
ignoreCase - Should the CommandExecutor ignore the case of the label.
parameterUsage - How to use the parameters of the Command (null if you can't use parameters).
description - A short description what the Command does.
permission - The permission you need to execute the Command.
labels - All labels a user can use for the Command. If you type in /command help, help will be the label (use <empty> if you want the command can be executed with no label, e.g. /command). You can define unltimited labels via vararg.
Method Detail

isIgnoreCase

public boolean isIgnoreCase()
Returns if the CommandExecutor should ignore the case of the label.

Returns:
If the CommandExecutor should ignore the case of the label.

getParameterUsage

public java.lang.String getParameterUsage()
Returns how to use the parameters of the Command (returns null if there aren't parameters). This is useful for help-functions.

Returns:
How to use the parameters of the Command.

getDescription

public java.lang.String getDescription()
Returns a short description what the Command does.

Returns:
A short description what the Command does.

getPermission

public java.lang.String getPermission()
Returns the permission you need to execute the Command.

Returns:
The permission you need to execute the Command.

getLabels

public java.lang.String[] getLabels()
Returns all labels a user can use for the Command. If you type in /command help, help will be the label (<empty> if the command can be executed without a label, e.g. /command).

Returns:
All labels for 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