Class GlowAbstractHorse

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.AbstractHorse, 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.entity.Tameable, org.bukkit.entity.Vehicle, org.bukkit.inventory.InventoryHolder, 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:
GlowChestedHorse, GlowHorse, GlowUndeadHorse

public abstract class GlowAbstractHorse extends GlowTameable implements org.bukkit.entity.AbstractHorse
  • Constructor Details

    • GlowAbstractHorse

      public GlowAbstractHorse(org.bukkit.Location location, org.bukkit.entity.EntityType type, double maxHealth)
  • Method Details

    • tryFeed

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

      public List<> createSpawnMessage()
      Description copied from class: GlowEntity
      Creates a list of Messages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.
      createSpawnMessage in class GlowAgeable
      A list of messages which can spawn this entity.
    • getVariant

      public org.bukkit.entity.Horse.Variant getVariant()
      Specified by:
      getVariant in interface org.bukkit.entity.AbstractHorse
    • setVariant

      public void setVariant(org.bukkit.entity.Horse.Variant variant)
      Specified by:
      setVariant in interface org.bukkit.entity.AbstractHorse
    • canBreed

      public boolean canBreed()
      Specified by:
      canBreed in interface org.bukkit.entity.Ageable
      Specified by:
      canBreed in interface org.bukkit.entity.Breedable
      canBreed in class GlowAgeable
    • getBreedingFoods

      public Set<org.bukkit.Material> getBreedingFoods()
      Description copied from class: GlowAnimal
      Returns an immutable set containing the breeding foods for the current animal.
      getBreedingFoods in class GlowAnimal
      an immutable set containing Material
    • computeDomestication

      protected int computeDomestication(org.bukkit.Material food)
      Returns the amount to increment the domestication (progress toward taming) when the given food is consumed by an untamed adult mob, before applying the maximum domestication. Zero is returned for any item this mob cannot eat.
      food - the food to consume
      the amount of domestication to gain
    • 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 GlowAnimal
      material - The food used to compute the growth amount.
      The age gained using the given food.
    • getDomestication

      public int getDomestication()
      Specified by:
      getDomestication in interface org.bukkit.entity.AbstractHorse
    • setDomestication

      public void setDomestication(int domestication)
      Specified by:
      setDomestication in interface org.bukkit.entity.AbstractHorse
    • getMaxDomestication

      public int getMaxDomestication()
      Specified by:
      getMaxDomestication in interface org.bukkit.entity.AbstractHorse
    • setMaxDomestication

      public void setMaxDomestication(int maxDomestication)
      Specified by:
      setMaxDomestication in interface org.bukkit.entity.AbstractHorse
    • getJumpStrength

      public double getJumpStrength()
      Specified by:
      getJumpStrength in interface org.bukkit.entity.AbstractHorse
    • setJumpStrength

      public void setJumpStrength(double jumpStrength)
      Specified by:
      setJumpStrength in interface org.bukkit.entity.AbstractHorse
    • isTamed

      public boolean isTamed()
      Specified by:
      isTamed in interface org.bukkit.entity.Tameable
      isTamed in class GlowTameable
    • setTamed

      public void setTamed(boolean tamed)
      Specified by:
      setTamed in interface org.bukkit.entity.Tameable
      setTamed in class GlowTameable