|
||||||||||
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.LastCommand
Shows last shouts, tells, wiz-tells, etc.
Field Summary | |
static int |
DEFAULT_MESSAGES
|
static int |
MAX_MESSAGES
|
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 commands. |
static LastCommand |
getImpl()
|
static byte |
getTextColor(java.lang.String type)
Returns the RPCConstants.TextStyle to use for the given message type. |
boolean |
handleEvent(CommandEvent event)
Handles the command. |
java.util.List |
last(Commandable agent,
java.lang.String type,
int num)
Gets the last N messages of the given type that the agent heard. |
boolean |
lastShouts(CommandEvent event,
int num)
Prints the last N shouts to the specified agent. |
static void |
record(java.util.List names,
java.lang.String type,
java.lang.String msg)
Records the last message a set of players heard. |
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 |
Field Detail |
public static final int DEFAULT_MESSAGES
public static final int MAX_MESSAGES
Method Detail |
public static LastCommand getImpl()
public void addCommands(java.util.Map commands, CommandList list)
addCommands
in interface BuiltInCommand
addCommands
in class SimpleHandler
list
- the CommandList we're associating with, if anycommands
- the map to place our commands in.public boolean handleEvent(CommandEvent event)
handleEvent
in class SimpleHandler
event
- 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 boolean lastShouts(CommandEvent event, int num)
public static void record(java.util.List names, java.lang.String type, java.lang.String msg)
names
- a (possibly null) list of names of players
who heard the message.type
- the message type: "say", "tell", "wiz",
"magetell", etc.msg
- the message, e.g. "Rhialto says: hi!"public java.util.List last(Commandable agent, java.lang.String type, int num)
agent
- the player to checktype
- the message typenum
- the max number to retrieve
public static byte getTextColor(java.lang.String type)
type
- a message type, such as "wiz", "tell", or "magetell".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |