Class SayTextAction
java.lang.Object
games.stendhal.server.entity.npc.action.SayTextAction
- All Implemented Interfaces:
ChatAction,PostTransitionAction
- Direct Known Subclasses:
TargetNPCSayTextAction
@Dev(category=CHAT,
label="\"...\"")
public class SayTextAction
extends Object
implements ChatAction
says the specified text, it works just like the normal parameter of add.
But in addition it add support for [variables]. Most notable [name] will
be replaced by the players name. And [quest.slotname:1] will be replaced
by the value stored in the questslot "slotname" at index 1.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSayTextAction(Iterable<String> texts) Creates a new SayTextAction.SayTextAction(String text) Creates a new SayTextAction.SayTextAction(String[] texts) Creates a new SayTextAction. -
Method Summary
-
Field Details
-
texts
-
-
Constructor Details
-
SayTextAction
Creates a new SayTextAction.- Parameters:
text- text to say
-
SayTextAction
Creates a new SayTextAction.- Parameters:
texts- list of texts from which a random one is said
-
SayTextAction
Creates a new SayTextAction.- Parameters:
texts- array of texts from which a random one is said
-
-
Method Details
-
fire
Description copied from interface:PostTransitionActiondoes some action after a transition.- Specified by:
firein interfaceChatAction- Specified by:
firein interfacePostTransitionAction- Parameters:
player- player who caused the transitionsentence- text he/she saidraiser- the NPC doing the transition
-
toString
-
hashCode
public int hashCode() -
equals
-