Package games.stendhal.server.entity.npc
Class EventRaiser
java.lang.Object
games.stendhal.server.entity.npc.EventRaiser
the source that raised an event
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adds an RPEventgets the RPEntity the SpeakerNPC is attending togets the EntitygetName()
gets the name of the entityint
getX()
gets the x-coordinateint
getY()
gets the y-coordinategetZone()
gets the zone of the entityvoid
lets the SpeakerNPC say a sentencevoid
setAttending(RPEntity rpentity)
Sets the rpentity to whom the SpeakerNPC is currently listening.void
setCurrentState(ConversationStates stateAfterCompletion)
sets the state of the FSM used by SpeakerNPCs
-
Constructor Details
-
EventRaiser
creates a new EventRaiser- Parameters:
entity
- Entity
-
-
Method Details
-
getAttending
gets the RPEntity the SpeakerNPC is attending to- Returns:
- RPEntity or
null
-
say
lets the SpeakerNPC say a sentence- Parameters:
sentence
- to say
-
getEntity
gets the Entity- Returns:
- Entity
-
getName
gets the name of the entity- Returns:
- name
-
setCurrentState
sets the state of the FSM used by SpeakerNPCs- Parameters:
stateAfterCompletion
- new state
-
setAttending
Sets the rpentity to whom the SpeakerNPC is currently listening. Note: You don't need to use this for most SpeakerNPCs.- Parameters:
rpentity
- the entity with whom the NPC should be talking.
-
addEvent
adds an RPEvent- Parameters:
event
- event to add
-
getX
public int getX()gets the x-coordinate- Returns:
- x
-
getY
public int getY()gets the y-coordinate- Returns:
- y
-
getZone
gets the zone of the entity- Returns:
- StendhalRPZone
-