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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadds an RPEventgets the RPEntity the SpeakerNPC is attending togets the EntitygetName()gets the name of the entityintgetX()gets the x-coordinateintgetY()gets the y-coordinategetZone()gets the zone of the entityvoidlets the SpeakerNPC say a sentencevoidsetAttending(RPEntity rpentity) Sets the rpentity to whom the SpeakerNPC is currently listening.voidsetCurrentState(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
-