|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.lib.commands.AudioCommand
Controls sound and music settings for your client.
| 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 CommandEvent that encapsulates all the state necessary to perform the command. |
boolean |
execute(CommandEvent event)
Executes the specified CommandEvent. |
static AudioCommand |
getImpl()
|
boolean |
knowsCommand(java.lang.String command)
Returns true if this Command wants to handle the command. |
boolean |
printAudioState(Commandable agent)
Prints (to the agent) their current audio settings. |
boolean |
turnOff(Player agent,
java.lang.String type)
Turns off audio for the specified type. |
boolean |
turnOn(Commandable agent,
java.lang.String type)
Turns on audio for the specified type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static AudioCommand getImpl()
public void addCommands(java.util.Map commands,
CommandList list)
BuiltInCommand
addCommands in interface BuiltInCommandcommands - 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)
CommandThis method exists to allow more than one game object to implement the same command verb, but with different expected arguments.
If two objects register for the same command and the same arguments, the object that was registered most recently gets to handle at the command.
knowsCommand in interface Commandcommand - the entire command string, including arguments
public CommandEvent createEvent(CommandEvent initial)
CommandThis method is called by the kernel. The kernel passes the event to the pre-hook, then calls Command.execute() (below) to execute the event, and finally calls the post-hook.
createEvent in interface Commandinitial - a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent event)
Command
execute in interface Commandevent - the CommandEvent to execute
public boolean printAudioState(Commandable agent)
public boolean turnOn(Commandable agent,
java.lang.String type)
type - "music", "sound", "alert", or "audio" (for all three)
public boolean turnOff(Player agent,
java.lang.String type)
type - "music", "sound", "alert", or "audio" (for all three)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||