|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.commands.SimpleHandler wyvern.lib.commands.ScoreCommand
Prints score in various formats.
Field Summary |
Fields inherited from class wyvern.kernel.commands.SimpleHandler |
delay_ |
Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Method Summary | |
void |
addCommands(java.util.Map commands,
CommandList list)
Adds our commands. |
static ScoreCommand |
getImpl()
|
boolean |
handleEvent(CommandEvent e)
Callback method for subclasses to handle their command. |
static void |
main(java.lang.String[] args)
Tests it. |
static java.lang.String |
printNarrowScore(Player p)
Prints score information to user in narrow form, for PDA. |
java.lang.String |
printPoints(Commandable agent)
Prints current shout and warning points. |
static java.lang.String |
printScore(Player p)
Prints score information to user. |
static java.lang.String |
printShortScore(Player p)
Prints score information to user, in abbreviated form. |
static void |
printTitle(Player p,
java.lang.StringBuffer sb)
Prints player or wizard title. |
static void |
printWizTitle(Player p,
java.lang.StringBuffer sb)
Prints first line of 'score' command for Wizards. |
Methods inherited from class wyvern.kernel.commands.SimpleHandler |
createEvent, execute, knowsCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static ScoreCommand getImpl()
public void addCommands(java.util.Map commands, CommandList list)
SimpleHandler
addCommands
in interface BuiltInCommand
addCommands
in class SimpleHandler
commands
- a Map whose keys are the command verbs,
and whose values are references to the SimpleHandler
instance that wants to handle the command.list
- the Player, Monster, Vehicle or other CommandList
implementation for which addCommands() is being called.public boolean handleEvent(CommandEvent e)
SimpleHandler
handleEvent
in class SimpleHandler
e
- a CommandEvent with various fields filled in:
the agent performing the command, the command verb and arguments,
the delay for the command, and success/failure messages.
public static java.lang.String printScore(Player p)
p
- the player
public static void printTitle(Player p, java.lang.StringBuffer sb)
public static void printWizTitle(Player p, java.lang.StringBuffer sb)
public static java.lang.String printShortScore(Player p)
p
- the player
public static java.lang.String printNarrowScore(Player p)
p
- the player
public java.lang.String printPoints(Commandable agent)
agent
- the player
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |