Class SayTextAction
java.lang.Object
games.stendhal.server.entity.npc.action.SayTextAction
- All Implemented Interfaces:
ChatAction
,PostTransitionAction
@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.
-
Constructor Summary
ConstructorDescriptionSayTextAction(Iterable<String> texts)
Creates a new SayTextAction.SayTextAction(String text)
Creates a new SayTextAction.SayTextAction(String[] texts)
Creates a new SayTextAction. -
Method Summary
-
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:PostTransitionAction
does some action after a transition.- Specified by:
fire
in interfaceChatAction
- Specified by:
fire
in interfacePostTransitionAction
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidraiser
- the NPC doing the transition
-
toString
-
hashCode
public int hashCode() -
equals
-