Class TalkableEntity

java.lang.Object
net.citizensnpcs.api.ai.speech.TalkableEntity
All Implemented Interfaces:
Comparable<Object>, Talkable

public class TalkableEntity extends Object implements Talkable
  • Constructor Details

    • TalkableEntity

      public TalkableEntity(Entity entity)
    • TalkableEntity

      public TalkableEntity(NPC npc)
  • Method Details

    • compareTo

      public int compareTo(Object o)
      Used to compare an Entity to this TalkableEntity
      Specified by:
      compareTo in interface Comparable<Object>
      Returns:
      0 if the Entities are the same, 1 if they are not, -1 if the object compared is not a valid LivingEntity
    • getEntity

      public Entity getEntity()
      Description copied from interface: Talkable
      Gets the LivingEntity associated with this Talkable
      Specified by:
      getEntity in interface Talkable
      Returns:
      a LivingEntity
    • getName

      public String getName()
      Description copied from interface: Talkable
      Gets the name of the Talkable LivingEntity
      Specified by:
      getName in interface Talkable
      Returns:
      name
    • talkNear

      public void talkNear(SpeechContext context, String text)
      Description copied from interface: Talkable
      Called when talking near this Talkable Entity to provide a universal method to getting an event/output.
      Specified by:
      talkNear in interface Talkable
      Parameters:
      context - the Speech context
      text - The message to send
    • talkTo

      public void talkTo(SpeechContext context, String text)
      Description copied from interface: Talkable
      Called when talking to this Talkable Entity to provide a universal method to getting an event/output.
      Specified by:
      talkTo in interface Talkable
      Parameters:
      context - the Speech context
      text - The message to send