Package org.bukkit.entity

# Interface AbstractHorse

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

All Known Subinterfaces:
  `ChestedHorse`, `Donkey`, `Horse`, `Llama`, `Mule`, `SkeletonHorse`, `TraderLlama`, `ZombieHorse`

public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable
Represents a Horse-like creature.

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.bukkit.entity.Entity

`Entity.Spigot`

## Method Summary

Modifier and Type
Method
Description
`int`
`getDomestication()`
Gets the domestication level of this horse.
`@NotNull AbstractHorseInventory`
`getInventory()`
Get the object's inventory.
`double`
`getJumpStrength()`
Gets the jump strength of this horse.
`int`
`getMaxDomestication()`
Gets the maximum domestication level of this horse.
`Horse.Variant`
`getVariant()`
Deprecated.
different variants are different classes
`boolean`
`isEating()`
Gets if a horse is in their eating animation.
`boolean`
`isEatingGrass()`
Gets if a horse is in their eating grass animation.
`boolean`
`isRearing()`
Gets if a horse is in their rearing animation.
`void`
`setDomestication(int level)`
Sets the domestication level of this horse.
`void`
`setEating(boolean eating)`
Sets if a horse is in their eating animation.
`void`
`setEatingGrass(boolean eating)`
Sets if a horse is in their eating grass animation.
`void`
`setJumpStrength(double strength)`
Sets the jump strength of this horse.
`void`
`setMaxDomestication(int level)`
Sets the maximum domestication level of this horse.
`void`
`setRearing(boolean rearing)`
Sets if a horse is in their rearing animation.
`void`
`setVariant(Horse.Variant variant)`
Deprecated.
you are required to spawn a different entity

### Methods inherited from interface org.bukkit.entity.Ageable

`getAge, isAdult, setAdult, setAge, setBaby`

### Methods inherited from interface org.bukkit.entity.Animals

`getBreedCause, getLoveModeTicks, isBreedItem, isBreedItem, isLoveMode, setBreedCause, setLoveModeTicks`

### Methods inherited from interface org.bukkit.attribute.Attributable

`getAttribute, registerAttribute`

### Methods inherited from interface net.kyori.adventure.audience.Audience

`clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound`

### Methods inherited from interface org.bukkit.entity.Breedable

`canBreed, getAgeLock, setAgeLock, setBreed`

### Methods inherited from interface org.bukkit.command.CommandSender

`getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage`

### Methods inherited from interface org.bukkit.entity.Damageable

`damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth`

### Methods inherited from interface org.bukkit.entity.Entity

`addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync`

### Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource

`asHoverEvent`

### Methods inherited from interface org.bukkit.entity.LivingEntity

`addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, getHandRaisedTime, getHurtDirection, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHand`

### Methods inherited from interface org.bukkit.loot.Lootable

`clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed`

### Methods inherited from interface org.bukkit.metadata.Metadatable

`getMetadata, hasMetadata, removeMetadata, setMetadata`

### Methods inherited from interface org.bukkit.entity.Mob

`getEquipment, getHeadRotationSpeed, getMaxHeadPitch, getPathfinder, getTarget, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAware, setLeftHanded, setTarget`

### Methods inherited from interface org.bukkit.Nameable

`customName, customName, getCustomName, setCustomName`

### Methods inherited from interface org.bukkit.permissions.Permissible

`addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment`

### Methods inherited from interface org.bukkit.persistence.PersistentDataHolder

`getPersistentDataContainer`

### Methods inherited from interface net.kyori.adventure.pointer.Pointered

`get, getOrDefault, getOrDefaultFrom, pointers`

### Methods inherited from interface org.bukkit.projectiles.ProjectileSource

`launchProjectile, launchProjectile`

### Methods inherited from interface org.bukkit.permissions.ServerOperator

`isOp, setOp`

### Methods inherited from interface org.bukkit.entity.Tameable

`getOwner, getOwnerUniqueId, isTamed, setOwner, setTamed`

### Methods inherited from interface org.bukkit.entity.Vehicle

`getVelocity, setVelocity`

## Method Details

### getVariant

@Deprecated @NotNull Horse.Variant getVariant()
Deprecated.
different variants are different classes
Gets the horse's variant.

A horse's variant defines its physical appearance and capabilities. Whether a horse is a regular horse, donkey, mule, or other kind of horse is determined using the variant.

Returns:
  a `Horse.Variant` representing the horse's variant

### setVariant

@Deprecated @Contract("_ -> fail") void setVariant(Horse.Variant variant)
Deprecated.
you are required to spawn a different entity

Parameters:
  `variant` - variant

### getDomestication

int getDomestication()
Gets the domestication level of this horse.

A higher domestication level indicates that the horse is closer to becoming tame. As the domestication level gets closer to the max domestication level, the chance of the horse becoming tame increases.

Returns:
  domestication level

### setDomestication

void setDomestication(int level)
Sets the domestication level of this horse.

Setting the domestication level to a high value will increase the horse's chances of becoming tame.

Domestication level must be greater than zero and no greater than the max domestication level of the horse, determined with `getMaxDomestication()`

Parameters:
  `level` - domestication level

### getMaxDomestication

int getMaxDomestication()
Gets the maximum domestication level of this horse.

The higher this level is, the longer it will likely take for the horse to be tamed.

Returns:
  the max domestication level

### setMaxDomestication

void setMaxDomestication(int level)
Sets the maximum domestication level of this horse.

Setting a higher max domestication will increase the amount of domesticating (feeding, riding, etc.) necessary in order to tame it, while setting a lower max value will have the opposite effect.

Maximum domestication must be greater than zero.

Parameters:
  `level` - the max domestication level

### getJumpStrength

double getJumpStrength()
Gets the jump strength of this horse.

Jump strength defines how high the horse can jump. A higher jump strength increases how high a jump will go.

Returns:
  the horse's jump strength

### setJumpStrength

void setJumpStrength(double strength)
Sets the jump strength of this horse.

A higher jump strength increases how high a jump will go. Setting a jump strength to 0 will result in no jump. You cannot set a jump strength to a value below 0 or above 2.

Parameters:
  `strength` - jump strength for this horse

### getInventory

@NotNull @NotNull AbstractHorseInventory getInventory()
Description copied from interface: `InventoryHolder`
Get the object's inventory.

Specified by:
  `getInventory` in interface `InventoryHolder`
Returns:
  The inventory.

### isEatingGrass

boolean isEatingGrass()
Gets if a horse is in their eating grass animation.

Returns:
  eating grass animation is active

### setEatingGrass

void setEatingGrass(boolean eating)
Sets if a horse is in their eating grass animation.

When true, the horse will lower its neck.

Parameters:
  `eating` - eating grass animation is active

### isRearing

boolean isRearing()
Gets if a horse is in their rearing animation.

Returns:
  rearing animation is active

### setRearing

void setRearing(boolean rearing)
Sets if a horse is in their rearing animation.

When true, the horse will stand on its hind legs.

Parameters:
  `rearing` - rearing animation is active

### isEating

boolean isEating()
Gets if a horse is in their eating animation.

Returns:
  eating animation is active

### setEating

void setEating(boolean eating)
Sets if a horse is in their eating animation.

When true, the horse will bob its head.

Parameters:
  `eating` - eating animation is active