Class EventRaiser

java.lang.Object
games.stendhal.server.entity.npc.EventRaiser

public class EventRaiser extends Object
the source that raised an event
Author:
hendrik
  • Constructor Details

    • EventRaiser

      public EventRaiser(Entity entity)
      creates a new EventRaiser
      Parameters:
      entity - Entity
  • Method Details

    • getAttending

      public RPEntity getAttending()
      gets the RPEntity the SpeakerNPC is attending to
      Returns:
      RPEntity or null
    • say

      public void say(String sentence)
      lets the SpeakerNPC say a sentence
      Parameters:
      sentence - to say
    • getEntity

      public Entity getEntity()
      gets the Entity
      Returns:
      Entity
    • getName

      public String getName()
      gets the name of the entity
      Returns:
      name
    • setCurrentState

      public void setCurrentState(ConversationStates stateAfterCompletion)
      sets the state of the FSM used by SpeakerNPCs
      Parameters:
      stateAfterCompletion - new state
    • setAttending

      public void setAttending(RPEntity rpentity)
      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

      public void addEvent(RPEvent event)
      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

      public StendhalRPZone getZone()
      gets the zone of the entity
      Returns:
      StendhalRPZone