Class Npc

java.lang.Object
de.oliver.fancynpcs.api.Npc

public abstract class Npc extends Object
  • Field Details

    • isTeamCreated

      protected final Map<UUID,Boolean> isTeamCreated
    • isVisibleForPlayer

      protected final Map<UUID,Boolean> isVisibleForPlayer
    • isLookingAtPlayer

      protected final Map<UUID,Boolean> isLookingAtPlayer
    • lastPlayerInteraction

      protected final Map<UUID,Long> lastPlayerInteraction
    • data

      protected NpcData data
    • saveToFile

      protected boolean saveToFile
  • Constructor Details

  • Method Details

    • generateLocalName

      protected String generateLocalName()
    • create

      public abstract void create()
    • spawn

      public abstract void spawn(org.bukkit.entity.Player player)
    • spawnForAll

      public void spawnForAll()
    • remove

      public abstract void remove(org.bukkit.entity.Player player)
    • removeForAll

      public void removeForAll()
    • shouldBeVisible

      protected boolean shouldBeVisible(org.bukkit.entity.Player player)
      Checks if the NPC should be visible for the player.
      Parameters:
      player - The player to check for.
      Returns:
      True if the NPC should be visible for the player, otherwise false.
    • checkAndUpdateVisibility

      public void checkAndUpdateVisibility(org.bukkit.entity.Player player)
    • lookAt

      public abstract void lookAt(org.bukkit.entity.Player player, org.bukkit.Location location)
    • update

      public abstract void update(org.bukkit.entity.Player player)
    • updateForAll

      public void updateForAll()
    • move

      public abstract void move(org.bukkit.entity.Player player, boolean swingArm)
    • move

      public void move(org.bukkit.entity.Player player)
    • moveForAll

      public void moveForAll(boolean swingArm)
    • moveForAll

      public void moveForAll()
    • interact

      public void interact(org.bukkit.entity.Player player)
    • interact

      public void interact(org.bukkit.entity.Player player, ActionTrigger actionTrigger)
    • refreshEntityData

      protected abstract void refreshEntityData(org.bukkit.entity.Player serverPlayer)
    • getEntityId

      public abstract int getEntityId()
    • getData

      public NpcData getData()
    • getEyeHeight

      public abstract float getEyeHeight()
    • getIsTeamCreated

      public Map<UUID,Boolean> getIsTeamCreated()
    • getIsVisibleForPlayer

      public Map<UUID,Boolean> getIsVisibleForPlayer()
    • getIsLookingAtPlayer

      public Map<UUID,Boolean> getIsLookingAtPlayer()
    • getLastPlayerInteraction

      public Map<UUID,Long> getLastPlayerInteraction()
    • isDirty

      public boolean isDirty()
    • setDirty

      public void setDirty(boolean dirty)
    • isSaveToFile

      public boolean isSaveToFile()
    • setSaveToFile

      public void setSaveToFile(boolean saveToFile)