Class GlowLivingEntity

java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.GlowLivingEntity
All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.attribute.Attributable, org.bukkit.command.CommandSender, org.bukkit.entity.Damageable, org.bukkit.entity.Entity, org.bukkit.entity.LivingEntity, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder, org.bukkit.projectiles.ProjectileSource
Direct Known Subclasses:
GlowArmorStand, GlowHumanEntity, GlowMob

public abstract class GlowLivingEntity extends GlowEntity implements org.bukkit.entity.LivingEntity
A GlowLivingEntity is a Player or Monster.
  • Field Details

    • taskManager

      protected final TaskManager taskManager
      The entity's AI task manager.
    • health

      protected double health
      The entity's health.
    • maxHealth

      protected double maxHealth
      The entity's max health.
    • deathTicks

      protected int deathTicks
      The LivingEntity's number of ticks since death.
    • movement

      protected org.bukkit.util.Vector movement

      The entity's movement as a unit vector, applied each tick according to the entity's speed.

      The y value is not used. X is used for forward movement and z is used for sideways movement. These values are relative to the entity's current yaw.

    • speed

      protected double speed
      The speed multiplier of the entity.
  • Constructor Details

    • GlowLivingEntity

      public GlowLivingEntity(org.bukkit.Location location)
      Creates a mob within the specified world.
      Parameters:
      location - The location.
    • GlowLivingEntity

      protected GlowLivingEntity(org.bukkit.Location location, double maxHealth)
      Creates a mob within the specified world.
      Parameters:
      location - The location.
      maxHealth - The max health of this mob.
  • Method Details

    • pulse

      public void pulse()
      Description copied from class: GlowEntity
      Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.
      Overrides:
      pulse in class GlowEntity
    • pulsePhysics

      protected void pulsePhysics()
      Overrides:
      pulsePhysics in class GlowEntity
    • getVelocityFromMovement

      protected org.bukkit.util.Vector getVelocityFromMovement()
    • jump

      protected void jump()
    • isJumping

      public boolean isJumping()
      Specified by:
      isJumping in interface org.bukkit.entity.LivingEntity
    • setJumping

      public void setJumping(boolean jumping)
      Specified by:
      setJumping in interface org.bukkit.entity.LivingEntity
    • reset

      public void reset()
      Description copied from class: GlowEntity
      Resets the previous location and other properties to their current value.
      Overrides:
      reset in class GlowEntity
    • createUpdateMessage

      public List<com.flowpowered.network.Message> createUpdateMessage(GlowSession session)
      Description copied from class: GlowEntity
      Creates a Message which can be sent to a client to update this entity.
      Overrides:
      createUpdateMessage in class GlowEntity
      Parameters:
      session - Session to update this entity for
      Returns:
      A message which can update this entity.
    • getEyeHeight

      public double getEyeHeight()
      Specified by:
      getEyeHeight in interface org.bukkit.entity.LivingEntity
    • getEyeHeight

      public double getEyeHeight(boolean ignoreSneaking)
      Specified by:
      getEyeHeight in interface org.bukkit.entity.LivingEntity
    • getEyeLocation

      @NotNull public @NotNull org.bukkit.Location getEyeLocation()
      Specified by:
      getEyeLocation in interface org.bukkit.entity.LivingEntity
    • hasLineOfSight

      public boolean hasLineOfSight(@NotNull @NotNull org.bukkit.entity.Entity other)
      Specified by:
      hasLineOfSight in interface org.bukkit.entity.LivingEntity
    • setHeadYaw

      public void setHeadYaw(float headYaw)
    • getEquipment

      public org.bukkit.inventory.EntityEquipment getEquipment()
      Specified by:
      getEquipment in interface org.bukkit.entity.LivingEntity
    • setRemainingAir

      public void setRemainingAir(int ticks)
      Specified by:
      setRemainingAir in interface org.bukkit.entity.LivingEntity
    • setMaximumAir

      public void setMaximumAir(int ticks)
      Specified by:
      setMaximumAir in interface org.bukkit.entity.LivingEntity
    • getRemoveWhenFarAway

      public boolean getRemoveWhenFarAway()
      Specified by:
      getRemoveWhenFarAway in interface org.bukkit.entity.LivingEntity
    • getCanPickupItems

      public boolean getCanPickupItems()
      Specified by:
      getCanPickupItems in interface org.bukkit.entity.LivingEntity
    • getHurtSound

      protected org.bukkit.Sound getHurtSound()
      Get the hurt sound of this entity, or null for silence.
      Returns:
      the hurt sound if available
    • getDeathSound

      protected org.bukkit.Sound getDeathSound()
      Get the death sound of this entity, or null for silence.
      Returns:
      the death sound if available
    • getAmbientSound

      protected org.bukkit.Sound getAmbientSound()
      Get the ambient sound this entity makes randomly, or null for silence.
      Returns:
      the ambient sound if available
    • getAmbientDelay

      protected int getAmbientDelay()
      Get the minimal delay until the entity can produce an ambient sound.
      Returns:
      the minimal delay until the entity can produce an ambient sound
    • getSoundVolume

      protected float getSoundVolume()
      The volume of the sounds this entity makes.
      Returns:
      the volume of the sounds
    • getSoundPitch

      protected float getSoundPitch()
      The pitch of the sounds this entity makes.
      Returns:
      the pitch of the sounds
    • canTakeDamage

      public boolean canTakeDamage(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause)
      Get whether this entity should take damage from the specified source.

      Usually used to check environmental sources such as drowning.

      Parameters:
      damageCause - the damage source to check
      Returns:
      whether this entity can take damage from the source
    • isArthropod

      public boolean isArthropod()
      Get whether of not this entity is an arthropod.
      Returns:
      true if this entity is an arthropod, false otherwise
    • isUndead

      public boolean isUndead()
      Get whether or not this entity is undead.
      Returns:
      true if this entity is undead, false otherwise
    • getLineOfSight

      @NotNull public @NotNull List<org.bukkit.block.Block> getLineOfSight(Set<org.bukkit.Material> transparent, int maxDistance)
      Specified by:
      getLineOfSight in interface org.bukkit.entity.LivingEntity
    • getTargetBlock

      @NotNull public @NotNull org.bukkit.block.Block getTargetBlock(Set<org.bukkit.Material> materials, int maxDistance)
      Specified by:
      getTargetBlock in interface org.bukkit.entity.LivingEntity
    • getTargetBlock

      @Nullable public @Nullable org.bukkit.block.Block getTargetBlock(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode)
      Specified by:
      getTargetBlock in interface org.bukkit.entity.LivingEntity
    • getTargetBlockFace

      @Nullable public @Nullable org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode)
      Specified by:
      getTargetBlockFace in interface org.bukkit.entity.LivingEntity
    • getTargetBlockInfo

      @Nullable public @Nullable com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode)
      Specified by:
      getTargetBlockInfo in interface org.bukkit.entity.LivingEntity
    • getTargetEntity

      @Nullable public @Nullable org.bukkit.entity.Entity getTargetEntity(int maxDistance, boolean ignoreBlocks)
      Specified by:
      getTargetEntity in interface org.bukkit.entity.LivingEntity
    • getTargetEntityInfo

      @Nullable public @Nullable com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks)
      Specified by:
      getTargetEntityInfo in interface org.bukkit.entity.LivingEntity
    • getTargetBlockExact

      @Nullable public @Nullable org.bukkit.block.Block getTargetBlockExact(int maxDistance)
      Specified by:
      getTargetBlockExact in interface org.bukkit.entity.LivingEntity
    • getTargetBlockExact

      @Nullable public @Nullable org.bukkit.block.Block getTargetBlockExact(int maxDistance, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode)
      Specified by:
      getTargetBlockExact in interface org.bukkit.entity.LivingEntity
    • rayTraceBlocks

      @Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceBlocks(double maxDistance)
      Specified by:
      rayTraceBlocks in interface org.bukkit.entity.LivingEntity
    • rayTraceBlocks

      @Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceBlocks(double maxDistance, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode)
      Specified by:
      rayTraceBlocks in interface org.bukkit.entity.LivingEntity
    • getLastTwoTargetBlocks

      @NotNull public @NotNull List<org.bukkit.block.Block> getLastTwoTargetBlocks(Set<org.bukkit.Material> materials, int maxDistance)
      Specified by:
      getLastTwoTargetBlocks in interface org.bukkit.entity.LivingEntity
    • isWithinSolidBlock

      public boolean isWithinSolidBlock()
      Returns whether the entity's eye location is within a solid block.
      Returns:
      true if the entity is in a solid block; false otherwise
    • launchProjectile

      @NotNull public <T extends org.bukkit.entity.Projectile> T launchProjectile(@NotNull @NotNull Class<? extends T> type)
      Specified by:
      launchProjectile in interface org.bukkit.projectiles.ProjectileSource
    • launchProjectile

      @NotNull public <T extends org.bukkit.entity.Projectile> T launchProjectile(@NotNull @NotNull Class<? extends T> type, org.bukkit.util.Vector vector)
      Specified by:
      launchProjectile in interface org.bukkit.projectiles.ProjectileSource
    • launchProjectile

      public <T extends org.bukkit.entity.Projectile> T launchProjectile(Class<? extends T> type, org.bukkit.util.Vector vector, float offset, float speed)
      Launches a projectile from this entity.
      Type Parameters:
      T - the projectile class
      Parameters:
      type - the projectile class
      vector - the direction to shoot in
      offset - TODO: document this parameter
      speed - the speed for the first flight tick
      Returns:
      the launched projectile
    • launchProjectile

      protected <T extends org.bukkit.entity.Projectile> T launchProjectile(Class<? extends T> type, org.bukkit.Location location, org.bukkit.util.Vector originalVector, float pitchOffset, float velocity)
      Launches a projectile from this entity in the horizontal direction it is facing, relative to the given velocity vector.
      Type Parameters:
      T - the projectile class
      Parameters:
      type - the projectile class
      location - the location to launch the projectile from
      originalVector - the direction to shoot in
      pitchOffset - degrees to subtract from the pitch angle while calculating the y component of the initial direction
      velocity - the speed for the first flight tick
      Returns:
      the launched projectile
    • setHealth

      public void setHealth(double health)
      Specified by:
      setHealth in interface org.bukkit.entity.Damageable
    • damage

      public void damage(double amount, org.bukkit.entity.Entity source, @NotNull @NotNull org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
      Specified by:
      damage in interface org.bukkit.entity.Damageable
      Overrides:
      damage in class GlowEntity
    • getMaxHealth

      public double getMaxHealth()
      Specified by:
      getMaxHealth in interface org.bukkit.entity.Damageable
    • setMaxHealth

      public void setMaxHealth(double health)
      Specified by:
      setMaxHealth in interface org.bukkit.entity.Damageable
    • resetMaxHealth

      public void resetMaxHealth()
      Specified by:
      resetMaxHealth in interface org.bukkit.entity.Damageable
    • addPotionEffect

      public boolean addPotionEffect(org.bukkit.potion.PotionEffect effect)
      Specified by:
      addPotionEffect in interface org.bukkit.entity.LivingEntity
    • addPotionEffect

      public boolean addPotionEffect(org.bukkit.potion.PotionEffect effect, boolean force)
      Specified by:
      addPotionEffect in interface org.bukkit.entity.LivingEntity
    • addPotionEffects

      public boolean addPotionEffects(Collection<org.bukkit.potion.PotionEffect> effects)
      Specified by:
      addPotionEffects in interface org.bukkit.entity.LivingEntity
    • hasPotionEffect

      public boolean hasPotionEffect(org.bukkit.potion.PotionEffectType type)
      Specified by:
      hasPotionEffect in interface org.bukkit.entity.LivingEntity
    • getPotionEffect

      public org.bukkit.potion.PotionEffect getPotionEffect(org.bukkit.potion.PotionEffectType potionEffectType)
      Specified by:
      getPotionEffect in interface org.bukkit.entity.LivingEntity
    • removePotionEffect

      public void removePotionEffect(org.bukkit.potion.PotionEffectType type)
      Specified by:
      removePotionEffect in interface org.bukkit.entity.LivingEntity
    • getActivePotionEffects

      public Collection<org.bukkit.potion.PotionEffect> getActivePotionEffects()
      Specified by:
      getActivePotionEffects in interface org.bukkit.entity.LivingEntity
    • clearActivePotionEffects

      public void clearActivePotionEffects()
    • updatePotionEffectsMetadata

      protected void updatePotionEffectsMetadata()
    • setOnGround

      public void setOnGround(boolean onGround)
      Description copied from class: GlowEntity
      Sets the on-ground flag and clears fall distance.
      Overrides:
      setOnGround in class GlowEntity
      Parameters:
      onGround - true if this entity is now on the ground; false otherwise
    • isGliding

      public boolean isGliding()
      Specified by:
      isGliding in interface org.bukkit.entity.LivingEntity
    • setGliding

      public void setGliding(boolean gliding)
      Specified by:
      setGliding in interface org.bukkit.entity.LivingEntity
    • getShieldBlockingDelay

      public int getShieldBlockingDelay()
      Specified by:
      getShieldBlockingDelay in interface org.bukkit.entity.LivingEntity
    • setShieldBlockingDelay

      public void setShieldBlockingDelay(int delay)
      Specified by:
      setShieldBlockingDelay in interface org.bukkit.entity.LivingEntity
    • getActiveItem

      public org.bukkit.inventory.ItemStack getActiveItem()
      Specified by:
      getActiveItem in interface org.bukkit.entity.LivingEntity
    • clearActiveItem

      public void clearActiveItem()
      Specified by:
      clearActiveItem in interface org.bukkit.entity.LivingEntity
    • getItemUseRemainingTime

      public int getItemUseRemainingTime()
      Specified by:
      getItemUseRemainingTime in interface org.bukkit.entity.LivingEntity
    • getHandRaisedTime

      public int getHandRaisedTime()
      Specified by:
      getHandRaisedTime in interface org.bukkit.entity.LivingEntity
    • isHandRaised

      public boolean isHandRaised()
      Specified by:
      isHandRaised in interface org.bukkit.entity.LivingEntity
    • isSwimming

      public boolean isSwimming()
      Specified by:
      isSwimming in interface org.bukkit.entity.LivingEntity
    • setSwimming

      public void setSwimming(boolean swimming)
      Specified by:
      setSwimming in interface org.bukkit.entity.LivingEntity
    • isRiptiding

      public boolean isRiptiding()
      Specified by:
      isRiptiding in interface org.bukkit.entity.LivingEntity
    • isSleeping

      public boolean isSleeping()
      Specified by:
      isSleeping in interface org.bukkit.entity.LivingEntity
    • setState

      public void setState(MobState state)
      Sets the AI state.
      Parameters:
      state - the new AI state
    • setAI

      public void setAI(boolean ai)
      Specified by:
      setAI in interface org.bukkit.entity.LivingEntity
    • hasAI

      public boolean hasAI()
      Specified by:
      hasAI in interface org.bukkit.entity.LivingEntity
    • attack

      public void attack(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Specified by:
      attack in interface org.bukkit.entity.LivingEntity
    • swingMainHand

      public void swingMainHand()
      Specified by:
      swingMainHand in interface org.bukkit.entity.LivingEntity
    • swingOffHand

      public void swingOffHand()
      Specified by:
      swingOffHand in interface org.bukkit.entity.LivingEntity
    • getCollidableExemptions

      @NotNull public @NotNull Set<UUID> getCollidableExemptions()
      Specified by:
      getCollidableExemptions in interface org.bukkit.entity.LivingEntity
    • getMemory

      @Nullable public <T> T getMemory(@NotNull @NotNull org.bukkit.entity.memory.MemoryKey<T> memoryKey)
      Specified by:
      getMemory in interface org.bukkit.entity.LivingEntity
    • setMemory

      public <T> void setMemory(@NotNull @NotNull org.bukkit.entity.memory.MemoryKey<T> memoryKey, @Nullable T t)
      Specified by:
      setMemory in interface org.bukkit.entity.LivingEntity
    • getCategory

      @NotNull public @NotNull org.bukkit.entity.EntityCategory getCategory()
      Specified by:
      getCategory in interface org.bukkit.entity.LivingEntity
    • playAnimation

      public void playAnimation(@NotNull @NotNull org.bukkit.EntityAnimation animation)
      Specified by:
      playAnimation in interface org.bukkit.entity.LivingEntity
    • getAttribute

      @Nullable public @Nullable org.bukkit.attribute.AttributeInstance getAttribute(@NotNull @NotNull org.bukkit.attribute.Attribute attribute)
      Specified by:
      getAttribute in interface org.bukkit.attribute.Attributable
    • registerAttribute

      public void registerAttribute(@NotNull @NotNull org.bukkit.attribute.Attribute attribute)
      Specified by:
      registerAttribute in interface org.bukkit.attribute.Attributable
    • entityInteract

      public boolean entityInteract(GlowPlayer player, InteractEntityMessage message)
      Overrides:
      entityInteract in class GlowEntity
    • tryUseTotem

      public boolean tryUseTotem()
      Use "Totem of Undying" if equipped
      Returns:
      result of totem use
    • playPickupItemAnimation

      public void playPickupItemAnimation(@NotNull @NotNull org.bukkit.entity.Item item, int quantity)
      Specified by:
      playPickupItemAnimation in interface org.bukkit.entity.LivingEntity
    • getTaskManager

      public TaskManager getTaskManager()
      The entity's AI task manager.
    • getAttributeManager

      public AttributeManager getAttributeManager()
      The LivingEntity's AttributeManager.
    • getHealth

      public double getHealth()
      The entity's health.
      Specified by:
      getHealth in interface org.bukkit.entity.Damageable
    • getDeathTicks

      public int getDeathTicks()
      The LivingEntity's number of ticks since death.
    • getMovement

      public org.bukkit.util.Vector getMovement()

      The entity's movement as a unit vector, applied each tick according to the entity's speed.

      The y value is not used. X is used for forward movement and z is used for sideways movement. These values are relative to the entity's current yaw.

    • setMovement

      public void setMovement(org.bukkit.util.Vector movement)

      The entity's movement as a unit vector, applied each tick according to the entity's speed.

      The y value is not used. X is used for forward movement and z is used for sideways movement. These values are relative to the entity's current yaw.

    • getSpeed

      public double getSpeed()
      The speed multiplier of the entity.
    • setSpeed

      public void setSpeed(double speed)
      The speed multiplier of the entity.
    • getKiller

      public org.bukkit.entity.Player getKiller()
      The player that killed this entity, or null if not killed by a player.
      Specified by:
      getKiller in interface org.bukkit.entity.LivingEntity
    • setKiller

      public void setKiller(org.bukkit.entity.Player killer)
      The player that killed this entity, or null if not killed by a player.
      Specified by:
      setKiller in interface org.bukkit.entity.LivingEntity
    • getPlayerDamageTick

      public int getPlayerDamageTick()
      The tick that the entity got hit by a player. The default value was set to -101 rather than 0.
    • setPlayerDamageTick

      public void setPlayerDamageTick(int playerDamageTick)
      The tick that the entity got hit by a player. The default value was set to -101 rather than 0.
    • isCollidable

      public boolean isCollidable()
      Whether entities can collide with this entity.
      Specified by:
      isCollidable in interface org.bukkit.entity.LivingEntity
    • setCollidable

      public void setCollidable(boolean collidable)
      Whether entities can collide with this entity.
      Specified by:
      setCollidable in interface org.bukkit.entity.LivingEntity
    • getArrowsStuck

      public int getArrowsStuck()
      The number of arrows stuck inside this entity.
      Specified by:
      getArrowsStuck in interface org.bukkit.entity.LivingEntity
    • setArrowsStuck

      public void setArrowsStuck(int arrowsStuck)
      The number of arrows stuck inside this entity.
      Specified by:
      setArrowsStuck in interface org.bukkit.entity.LivingEntity
    • getArrowsInBody

      public int getArrowsInBody()
      The number of arrows in an entity's body.
      TODO: Investigate difference between this and `arrowsStuck`.
      Specified by:
      getArrowsInBody in interface org.bukkit.entity.LivingEntity
    • setArrowsInBody

      public void setArrowsInBody(int arrowsInBody)
      The number of arrows in an entity's body.
      TODO: Investigate difference between this and `arrowsStuck`.
      Specified by:
      setArrowsInBody in interface org.bukkit.entity.LivingEntity
    • getArrowCooldown

      public int getArrowCooldown()
      The time in ticks until the next arrow leaves the entity's body.
      Specified by:
      getArrowCooldown in interface org.bukkit.entity.LivingEntity
    • setArrowCooldown

      public void setArrowCooldown(int arrowCooldown)
      The time in ticks until the next arrow leaves the entity's body.
      Specified by:
      setArrowCooldown in interface org.bukkit.entity.LivingEntity
    • getAbsorptionAmount

      public double getAbsorptionAmount()
      The entity's absorption amount (the amount of health supplementing its max health).
      Specified by:
      getAbsorptionAmount in interface org.bukkit.entity.Damageable
    • setAbsorptionAmount

      public void setAbsorptionAmount(double absorptionAmount)
      The entity's absorption amount (the amount of health supplementing its max health).
      Specified by:
      setAbsorptionAmount in interface org.bukkit.entity.Damageable
    • isInvisible

      public boolean isInvisible()
      Whether the entity is invisible.
      Specified by:
      isInvisible in interface org.bukkit.entity.LivingEntity
    • setInvisible

      public void setInvisible(boolean invisible)
      Whether the entity is invisible.
      Specified by:
      setInvisible in interface org.bukkit.entity.LivingEntity
    • getHurtDirection

      public float getHurtDirection()
      The entity's hurt direction (angle).
      Specified by:
      getHurtDirection in interface org.bukkit.entity.LivingEntity
    • setHurtDirection

      public void setHurtDirection(float hurtDirection)
      The entity's hurt direction (angle).
      Specified by:
      setHurtDirection in interface org.bukkit.entity.LivingEntity
    • getLastDamage

      public double getLastDamage()
      The magnitude of the last damage the entity took.
      Specified by:
      getLastDamage in interface org.bukkit.entity.LivingEntity
    • setLastDamage

      public void setLastDamage(double lastDamage)
      The magnitude of the last damage the entity took.
      Specified by:
      setLastDamage in interface org.bukkit.entity.LivingEntity
    • getRemainingAir

      public int getRemainingAir()
      How long the entity has until it runs out of air.
      Specified by:
      getRemainingAir in interface org.bukkit.entity.LivingEntity
    • getMaximumAir

      public int getMaximumAir()
      The maximum amount of air the entity can hold.
      Specified by:
      getMaximumAir in interface org.bukkit.entity.LivingEntity
    • getNoDamageTicks

      public int getNoDamageTicks()
      The number of ticks remaining in the invincibility period.
      Specified by:
      getNoDamageTicks in interface org.bukkit.entity.LivingEntity
    • setNoDamageTicks

      public void setNoDamageTicks(int noDamageTicks)
      The number of ticks remaining in the invincibility period.
      Specified by:
      setNoDamageTicks in interface org.bukkit.entity.LivingEntity
    • getMaximumNoDamageTicks

      public int getMaximumNoDamageTicks()
      The default length of the invincibility period.
      Specified by:
      getMaximumNoDamageTicks in interface org.bukkit.entity.LivingEntity
    • setMaximumNoDamageTicks

      public void setMaximumNoDamageTicks(int maximumNoDamageTicks)
      The default length of the invincibility period.
      Specified by:
      setMaximumNoDamageTicks in interface org.bukkit.entity.LivingEntity
    • setRemoveWhenFarAway

      public void setRemoveWhenFarAway(boolean removeWhenFarAway)
      Whether the entity should be removed if it is too distant from players.
      Specified by:
      setRemoveWhenFarAway in interface org.bukkit.entity.LivingEntity
    • setCanPickupItems

      public void setCanPickupItems(boolean canPickupItems)
      Whether the (non-Player) entity can pick up armor and tools.
      Specified by:
      setCanPickupItems in interface org.bukkit.entity.LivingEntity
    • getEquipmentMonitor

      public EquipmentMonitor getEquipmentMonitor()
      Monitor for the equipment of this entity.
    • isFallFlying

      public boolean isFallFlying()
      Whether the entity can automatically glide when falling with an Elytra equipped. This value is ignored for players.
    • setFallFlying

      public void setFallFlying(boolean fallFlying)
      Whether the entity can automatically glide when falling with an Elytra equipped. This value is ignored for players.
    • getLastDamager

      public org.bukkit.entity.Entity getLastDamager()
      The last entity which damaged this living entity.
    • setLastDamager

      public void setLastDamager(org.bukkit.entity.Entity lastDamager)
      The last entity which damaged this living entity.
    • getHeadYaw

      public float getHeadYaw()
      The head rotation of the living entity, if applicable.
    • getState

      public MobState getState()
      The entity's current AI state.