wyvern.lib.commands
Class ShoutEvent

java.lang.Object
  extended bywyvern.kernel.properties.PList
      extended bywyvern.kernel.commands.EventImpl
          extended bywyvern.lib.commands.ShoutEvent
All Implemented Interfaces:
Broadcaster, CommandEvent, PropertyList, VerbalEvent

public class ShoutEvent
extends EventImpl
implements VerbalEvent

Encapsulates a player shout.

Version:
1.0, Nov 07, 2003
Author:
Steve Yegge

Field Summary
static int MAX_SHOUT_LENGTH
           
 
Fields inherited from class wyvern.kernel.commands.EventImpl
agent_, appendToFile_, argString_, argStringParsed_, argv_, argvParsed_, delay_, failureMessage_, filterObjects_, filters_, handler_, map_, modified_, originalText_, playerOriginated_, redirectFile_, redirecting_, sendToAgent_, successMessage_, verb_, vetoed_, wizParsed_
 
Fields inherited from class wyvern.kernel.properties.PList
readOnly_
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Constructor Summary
ShoutEvent(java.lang.String originalText, Commandable agent)
          Constructs a new ShoutEvent.
 
Method Summary
 boolean execute()
          Executes the shout.
 java.lang.String getMessage()
          Returns the message that will be communicated, stripped of the command verb.
 int getRequiredShoutPoints()
           
 boolean isCensored()
           
 void setCensored()
           
 void setMessage(java.lang.String msg)
          Sets the message to be said, shouted, told, whispered.
 void setRequiredShoutPoints(int value)
           
 
Methods inherited from class wyvern.kernel.commands.EventImpl
broadcast, broadcast, broadcast, broadcast, broadcast, checkVeto, fail, filterMessage, findAllMatches, findByHashcode, findInMap, findNeighbor, findObject, findTarget, getAgent, getArgs, getArgString, getDelay, getFailureMessage, getFilterObjects, getFilters, getHandler, getMap, getOriginalText, getRedirectFile, getSuccessMessage, getVerb, hasArgs, isAppending, isModified, isMonster, isPlayer, isPlayerOriginated, isRedirecting, isSendingToAgent, isVetoed, isWizard, main, message, message, noArgs, parseArgString, parseARGV, parseVerb, profileParsing, redirectMessage, runPostHooks, runPreHooks, searchInv, searchInvAndMapNearby, searchInvAndMapUnder, searchInvByHashcode, searchMapNearby, searchMapUnder, searchMapUnderByHashcode, setAgent, setArgs, setDelay, setFailureMessage, setHandler, setMap, setModified, setOriginalText, setPlayerOriginated, setSuccessMessage, setVerb, setVeto, toString, veto
 
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, transientlyRemoveProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wyvern.lib.PropertyList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, getDoubleProperty, getInheritedProperty, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, 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, transientlyRemoveProperty
 

Field Detail

MAX_SHOUT_LENGTH

public static final int MAX_SHOUT_LENGTH
See Also:
Constant Field Values
Constructor Detail

ShoutEvent

public ShoutEvent(java.lang.String originalText,
                  Commandable agent)
Constructs a new ShoutEvent.

Parameters:
originalText - whatever the user typed
agent - the person shouting something
Method Detail

getMessage

public java.lang.String getMessage()
Description copied from interface: VerbalEvent
Returns the message that will be communicated, stripped of the command verb. It's usually just the argument string for the event.

Specified by:
getMessage in interface VerbalEvent
Returns:
whatever the user is going to say, shout, tell

setMessage

public void setMessage(java.lang.String msg)
Description copied from interface: VerbalEvent
Sets the message to be said, shouted, told, whispered.

Specified by:
setMessage in interface VerbalEvent
Parameters:
msg - the new message to shout, say, tell, whisper

setCensored

public void setCensored()

isCensored

public boolean isCensored()

setRequiredShoutPoints

public void setRequiredShoutPoints(int value)

getRequiredShoutPoints

public int getRequiredShoutPoints()

execute

public boolean execute()
Executes the shout. All of the preconditions have been checked. If the event is vetoed, issues failure message. Otherwise, sends out the shout, updates logs, etc.