net.jetrix.commands
Interface Command

All Known Subinterfaces:
ParameterCommand
All Known Implementing Classes:
AbstractCommand, AwayCommand, BroadcastCommand, ConfigCommand, EmoteCommand, GotoCommand, HelpCommand, IgnoreCommand, IpCommand, JoinCommand, KickCommand, LanguageCommand, ListCommand, ModeCommand, MotdCommand, MoveCommand, OperatorCommand, PauseCommand, PetitionCommand, PingCommand, RandomCommand, ReplyCommand, SpecListCommand, StartCommand, StopCommand, SummonCommand, TeamMessageCommand, TeleportCommand, TellCommand, TimeCommand, VersionCommand, WhoCommand

public interface Command

A command consummes a CommandMessage to execute a specific operation.

Version:
$Revision: 545 $, $Date: 2005-01-05 18:16:04 +0100 (mer., 05 janv. 2005) $
Author:
Emmanuel Bourg

Method Summary
 void execute(CommandMessage message)
          Execute the command.
 int getAccessLevel()
          Return the required access level to execute this command.
 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.
 

Method Detail

getAliases

String[] getAliases()
Return the different names available to invoke this command. An alias doesn't contain the leading character used to call a command ("/" or "!"). The first alias in the array is the default name that will be displayed in the /help list.


getUsage

String getUsage(Locale locale)
Return the usage of this command, for example /cmd <param1> <param2>

Parameters:
locale - the locale to be used for the usage

getDescription

String getDescription(Locale locale)
Return a description of this command.

Parameters:
locale - the locale to be used for the description

getAccessLevel

int getAccessLevel()
Return the required access level to execute this command.


setAccessLevel

void setAccessLevel(int level)
Set the access level required to execute this command.

Parameters:
level - the access level
Since:
0.2

isHidden

boolean isHidden()
Tells if the command is hidden from the /help list.

Since:
0.2

setHidden

void setHidden(boolean hidden)
Change the hidden status of the command on the /help list.

Parameters:
hidden -
Since:
0.2

execute

void execute(CommandMessage message)
Execute the command.



Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.