|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.commands.PickupCommand
Handles "get {item}" and "get all" commands. Creates a PickupEvent to encapsulate what happened during the event.
Method Summary | |
void |
addCommands(java.util.Map commands,
CommandList list)
Tells the Command to add the commands that it wants to implement into the passed data structure. |
CommandEvent |
createEvent(CommandEvent initial)
Creates a PickupEvent from a user command. |
boolean |
execute(CommandEvent e)
Executes the PickupEvent. |
static PickupCommand |
getImpl()
|
boolean |
knowsCommand(java.lang.String command)
We only handle straight pickup & get commands; the GetFrom command handles removing things from containers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PickupCommand getImpl()
public void addCommands(java.util.Map commands, CommandList list)
BuiltInCommand
addCommands
in interface BuiltInCommand
commands
- a Map whose keys are commands, and whose values
are Commands that handle those commands.list
- the CommandList the Command is being added to.public boolean knowsCommand(java.lang.String command)
knowsCommand
in interface Command
command
- the original text of the command
public CommandEvent createEvent(CommandEvent initial)
createEvent
in interface Command
initial
- the initial event wrapping the command
public boolean execute(CommandEvent e)
execute
in interface Command
e
- a PickupEvent to execute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |