wyvern.lib.commands.autobag
Class AutobagCommand
java.lang.Object
wyvern.kernel.properties.PList
wyvern.kernel.commands.SimpleHandler
wyvern.lib.commands.autobag.AutobagCommand
- All Implemented Interfaces:
- BuiltInCommand, Command, PropertyList
- public class AutobagCommand
- extends SimpleHandler
Provides the "autobag" command, which lets you set up and administer
rules (similar to mail-filtering rules) that automatically place
objects in bags according to user-specified criteria.
The autobag
command's arguments are actually a flexible
mini-language. The first word after "autobag" is a subcommand.
The subcommands are:
-
into
- adds a new rule in the mini-language.
-
list
- lists all your autobag rules.
-
disable
- disables a particular rule temporarily.
-
enable
- reenables a rule that was disabled
-
delete
- deletes a rule permanently
-
rename
- renames an existing rule
-
adjust
- moves a rule up or down in the list
-
shortcut
- creates a ready-made, popular rule for you
The syntax and usage for all the subcommands are described in the
Wyvern Player's Manual.
- Version:
- 1.0, Dec 27, 2003
- Author:
- Steve Yegge
Methods inherited from class wyvern.kernel.properties.PList |
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, toString, transientlyRemoveProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AutobagCommand
public AutobagCommand()
getImpl
public static AutobagCommand getImpl()
addCommands
public void addCommands(java.util.Map commands,
CommandList list)
- Description copied from class:
SimpleHandler
- Adds our commands. Subclasses should override this and,
for each command the subclass wants to implement, put it
in the "commands" map.
- Specified by:
addCommands
in interface BuiltInCommand
- Specified by:
addCommands
in class SimpleHandler
- Parameters:
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.
handleEvent
public boolean handleEvent(CommandEvent e)
- Description copied from class:
SimpleHandler
- Callback method for subclasses to handle their command.
- Specified by:
handleEvent
in class SimpleHandler
- Parameters:
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.
- Returns:
- true if the event was completed successfully; false
if it couldn't be executed for some reason. It's important
to return the right value, since the appropriate post-hook will
be run depending on whether the command succeeded or failed.
delete
public boolean delete(CommandEvent e)
- Deletes a rule by number.
shortcut
public boolean shortcut(CommandEvent e)
- Lets you type in a predefined shortcut for a popular
autobag command.