org.bukkit.entity
Interface Horse

All Superinterfaces:
Ageable, Animals, Creature, Damageable, Entity, InventoryHolder, LivingEntity, Metadatable, ProjectileSource, Tameable, Vehicle

public interface Horse
extends Animals, Vehicle, InventoryHolder, Tameable

Represents a Horse.


Nested Class Summary
static class Horse.Color
          Represents the base color that the horse has.
static class Horse.Style
          Represents the style, or markings, that the horse has.
static class Horse.Variant
          Represents the different types of horses that may exist.
 
Method Summary
 Horse.Color getColor()
          Gets the horse's color.
 int getDomestication()
          Gets the domestication level of this horse.
 HorseInventory 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.Style getStyle()
          Gets the horse's style.
 Horse.Variant getVariant()
          Gets the horse's variant.
 boolean isCarryingChest()
          Gets whether the horse has a chest equipped.
 void setCarryingChest(boolean chest)
          Sets whether the horse has a chest equipped.
 void setColor(Horse.Color color)
          Sets the horse's color.
 void 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 setStyle(Horse.Style style)
          Sets the style of this horse.
 void setVariant(Horse.Variant variant)
          Sets the horse's variant.
 
Methods inherited from interface org.bukkit.entity.Ageable
canBreed, getAge, getAgeLock, isAdult, setAdult, setAge, setAgeLock, setBaby, setBreed
 
Methods inherited from interface org.bukkit.entity.Creature
getTarget, setTarget
 
Methods inherited from interface org.bukkit.entity.LivingEntity
_INVALID_getLastDamage, _INVALID_setLastDamage, addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getCustomName, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, hasLineOfSight, hasPotionEffect, isCustomNameVisible, isLeashed, removePotionEffect, setCanPickupItems, setCustomName, setCustomNameVisible, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, shootArrow, throwEgg, throwSnowball
 
Methods inherited from interface org.bukkit.entity.Damageable
_INVALID_damage, _INVALID_damage, _INVALID_getHealth, _INVALID_getMaxHealth, _INVALID_setHealth, _INVALID_setMaxHealth, damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth
 
Methods inherited from interface org.bukkit.entity.Entity
eject, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWorld, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
 
Methods inherited from interface org.bukkit.entity.Vehicle
getVelocity, setVelocity
 
Methods inherited from interface org.bukkit.entity.Tameable
getOwner, isTamed, setOwner, setTamed
 

Method Detail

getVariant

Horse.Variant getVariant()
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

void setVariant(Horse.Variant variant)
Sets 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 can be set using the variant.

Setting a horse's variant does not change its attributes such as its owner and its tamed status, but changing a mule or donkey with a chest to another variant which does not support a chest will remove the chest and its contents.

Parameters:
variant - a Horse.Variant for this horse

getColor

Horse.Color 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(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

Horse.Style 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(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

boolean isCarryingChest()
Gets whether the horse has a chest equipped.

Returns:
true if the horse has chest storage

setCarryingChest

void setCarryingChest(boolean chest)
Sets whether the horse has a chest equipped. Removing a chest will also clear the chest's inventory.

Parameters:
chest - true if the horse should have a chest

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

HorseInventory getInventory()
Description copied from interface: InventoryHolder
Get the object's inventory.

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


Copyright © 2014. All rights reserved.