Class GlowAnimal

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.Ageable, org.bukkit.entity.Animals, org.bukkit.entity.Breedable, org.bukkit.entity.Creature, org.bukkit.entity.Damageable, org.bukkit.entity.Entity, org.bukkit.entity.LivingEntity, org.bukkit.entity.Mob, org.bukkit.loot.Lootable, 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:
GlowChicken, GlowCow, GlowMooshroom, GlowPig, GlowPolarBear, GlowRabbit, GlowSheep, GlowTameable

public class GlowAnimal extends GlowAgeable implements org.bukkit.entity.Animals
Represents an Animal, such as a Cow.
  • Constructor Details

    • GlowAnimal

      public GlowAnimal(org.bukkit.Location location, org.bukkit.entity.EntityType type, double maxHealth)
      Creates a new ageable animal.
      location - The location of the animal.
      type - The type of animal.
      maxHealth - The max health of this animal.
  • Method Details

    • getAmbientDelay

      protected int getAmbientDelay()
      Description copied from class: GlowLivingEntity
      Get the minimal delay until the entity can produce an ambient sound.
      getAmbientDelay in class GlowLivingEntity
      the minimal delay until the entity can produce an ambient sound
    • tryFeed

      protected boolean tryFeed(org.bukkit.Material type, GlowPlayer player)
      Determines whether this entity can eat an item while healthy, and if so, applies the effects of eating it.
      player - the player feeding the entity, for statistical purposes
      type - an item that may be food
      true if the item should be consumed; false otherwise
    • entityInteract

      public boolean entityInteract(GlowPlayer player, InteractEntityMessage message)
      entityInteract in class GlowAgeable
    • getBreedingFoods

      public Set<org.bukkit.Material> getBreedingFoods()
      Returns an immutable set containing the breeding foods for the current animal.
      an immutable set containing Material
    • computeGrowthAmount

      protected int computeGrowthAmount(org.bukkit.Material material)
      Description copied from class: GlowAgeable
      Computes the growth amount using a specific material for the current ageable creature. Always returns 0 for an adult or if the material is not food for the creature.
      computeGrowthAmount in class GlowAgeable
      material - The food used to compute the growth amount.
      The age gained using the given food.
    • getBreedCause

      @Nullable public @Nullable UUID getBreedCause()
      Specified by:
      getBreedCause in interface org.bukkit.entity.Animals
    • setBreedCause

      public void setBreedCause(@Nullable @Nullable UUID uuid)
      Specified by:
      setBreedCause in interface org.bukkit.entity.Animals
    • isLoveMode

      public boolean isLoveMode()
      Specified by:
      isLoveMode in interface org.bukkit.entity.Animals