Interface AbstractHorse
- All Superinterfaces:
Ageable
,Animals
,Attributable
,CommandSender
,Creature
,Damageable
,Entity
,InventoryHolder
,LivingEntity
,Lootable
,Metadatable
,Mob
,Nameable
,Permissible
,PersistentDataHolder
,ProjectileSource
,ServerOperator
,Tameable
,Vehicle
- All Known Subinterfaces:
ChestedHorse
,Donkey
,Horse
,Llama
,Mule
,SkeletonHorse
,TraderLlama
,ZombieHorse
public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description int
getDomestication()
Gets the domestication level of this horse.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 classesvoid
setDomestication(int level)
Sets the domestication level of this horse.void
setJumpStrength(double strength)
Sets the jump strength of this horse.void
setMaxDomestication(int level)
Sets the maximum domestication level of this horse.void
setVariant(Horse.Variant variant)
Deprecated.you are required to spawn a different entityMethods inherited from interface org.bukkit.entity.Ageable
canBreed, getAge, getAgeLock, isAdult, setAdult, setAge, setAgeLock, setBaby, setBreed
Methods inherited from interface org.bukkit.entity.Animals
getBreedCause, getLoveModeTicks, isLoveMode, setBreedCause, setLoveModeTicks
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, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, getActivePotionEffects, getCanPickupItems, getCollidableExemptions, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isLeashed, isRiptiding, isSleeping, isSwimming, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setCanPickupItems, setCollidable, setGliding, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.loot.Lootable
getLootTable, getSeed, setLootTable, setSeed
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
-
Method Details
-
getVariant
Deprecated.different variants are different classesGets 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.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
Description copied from interface:InventoryHolder
Get the object's inventory.- Specified by:
getInventory
in interfaceInventoryHolder
- Returns:
- The inventory.
-