|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jetrix.commands.AbstractCommand
public abstract class AbstractCommand
Abstract command.
Field Summary | |
---|---|
protected boolean |
hidden
|
protected int |
level
|
protected static Logger |
log
|
Constructor Summary | |
---|---|
AbstractCommand()
|
Method Summary | |
---|---|
int |
getAccessLevel()
Return the required access level to execute this command. |
protected String |
getAlias()
Return the command alias. |
String[] |
getAliases()
Return the different names available to invoke this command. |
String |
getDescription(Locale locale)
Return a description of this command. |
String |
getUsage(Locale locale)
Return the usage of this command, for example /cmd <param1> <param2> |
boolean |
isHidden()
Tells if the command is hidden from the /help list. |
void |
setAccessLevel(int level)
Set the access level required to execute this command. |
void |
setHidden(boolean hidden)
Change the hidden status of the command on the /help list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.jetrix.commands.Command |
---|
execute |
Field Detail |
---|
protected int level
protected boolean hidden
protected static Logger log
Constructor Detail |
---|
public AbstractCommand()
Method Detail |
---|
public int getAccessLevel()
Command
getAccessLevel
in interface Command
public void setAccessLevel(int level)
Command
setAccessLevel
in interface Command
level
- the access levelpublic boolean isHidden()
Command
isHidden
in interface Command
public void setHidden(boolean hidden)
Command
setHidden
in interface Command
public String getUsage(Locale locale)
Command
getUsage
in interface Command
locale
- the locale to be used for the usagepublic String getDescription(Locale locale)
Command
getDescription
in interface Command
locale
- the locale to be used for the descriptionprotected String getAlias()
public String[] getAliases()
Command
getAliases
in interface Command
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |