Interface Horse

All Superinterfaces:
AbstractHorse, Ageable, Animals, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, InventoryHolder, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter, Tameable, Vehicle

public interface Horse extends AbstractHorse
Represents a Horse.
  • Method Details

    • getColor

      Gets the horse's color.

      Colors only apply to horses, not to donkeys, mules, skeleton horses or undead horses.

      Returns:
      a Horse.Color representing the horse's group
    • setColor

      void setColor(@NotNull @NotNull Horse.Color color)
      Sets the horse's color.

      Attempting to set a color for any donkey, mule, skeleton horse or undead horse will not result in a change.

      Parameters:
      color - a Horse.Color for this horse
    • getStyle

      Gets the horse's style. Styles determine what kind of markings or patterns a horse has.

      Styles only apply to horses, not to donkeys, mules, skeleton horses or undead horses.

      Returns:
      a Horse.Style representing the horse's style
    • setStyle

      void setStyle(@NotNull @NotNull Horse.Style style)
      Sets the style of this horse. Styles determine what kind of markings or patterns a horse has.

      Attempting to set a style for any donkey, mule, skeleton horse or undead horse will not result in a change.

      Parameters:
      style - a Horse.Style for this horse
    • isCarryingChest

      @Deprecated(since="1.11") boolean isCarryingChest()
      Deprecated.
      Returns:
      carrying chest status
    • setCarryingChest

      @Deprecated(since="1.11") void setCarryingChest(boolean chest)
      Deprecated.
      Parameters:
      chest - chest
    • getInventory

      Description copied from interface: InventoryHolder
      Get the object's inventory.
      Specified by:
      getInventory in interface AbstractHorse
      Specified by:
      getInventory in interface InventoryHolder
      Returns:
      The inventory.