接口 AbstractHorse
- 所有超级接口:
Ageable
,Animals
,Attributable
,Breedable
,CommandSender
,Creature
,Damageable
,Entity
,InventoryHolder
,LivingEntity
,Lootable
,Metadatable
,Mob
,Nameable
,Permissible
,PersistentDataHolder
,ProjectileSource
,ServerOperator
,Tameable
,Vehicle
- 所有已知子接口:
Camel
,ChestedHorse
,Donkey
,Horse
,Llama
,Mule
,SkeletonHorse
,TraderLlama
,ZombieHorse
原文: Represents a Horse-like creature.
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明int
获得此马的驯化等级.获取该对象的用户界面项目.double
获得此马的跳跃强度.int
获得此马的最高驯化等级.已过时。different variants are different classesboolean
Gets whether the horse is currently grazing hay.void
setDomestication
(int level) 设置此马的驯化等级.void
setEatingHaystack
(boolean eatingHaystack) Sets whether the horse is grazing hay.void
setJumpStrength
(double strength) 设置此马的跳跃强度.void
setMaxDomestication
(int level) 设置此马的最高驯化等级.void
setVariant
(Horse.Variant variant) 已过时。you are required to spawn a different entity从接口继承的方法 org.bukkit.entity.Animals
getBreedCause, getLoveModeTicks, isBreedItem, isBreedItem, isLoveMode, setBreedCause, setLoveModeTicks
从接口继承的方法 org.bukkit.attribute.Attributable
getAttribute
从接口继承的方法 org.bukkit.entity.Breedable
canBreed, getAgeLock, setAgeLock, setBreed
从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
从接口继承的方法 org.bukkit.entity.Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport
从接口继承的方法 org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getItemInUse, getItemInUseTicks, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isLeashed, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, swingMainHand, swingOffHand
从接口继承的方法 org.bukkit.loot.Lootable
getLootTable, getSeed, setLootTable, setSeed
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName
从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
从接口继承的方法 org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
从接口继承的方法 org.bukkit.entity.Vehicle
getVelocity, setVelocity
-
方法详细资料
-
getVariant
已过时。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.
- 返回:
- a
Horse.Variant
representing the horse's variant
-
setVariant
已过时。you are required to spawn a different entity- 参数:
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.
- 返回:
- 驯化等级
-
setDomestication
void setDomestication(int level) 设置此马的驯化等级.设置此马的驯化等级更高将让这匹马的驯化几率提升.
驯化等级必须 大于0 且 小于最高驯化等级, 由
getMaxDomestication()
定义.原文: 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()
- 参数:
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.
- 返回:
- 最高驯化等级
-
setMaxDomestication
void setMaxDomestication(int level) 设置此马的最高驯化等级. 设定一个更高的驯化等级将会增加需要驯化的次数(例如喂食, 骑乘), 反之减少.最高驯化等级必须大于0.
原文: 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.
- 参数:
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.
- 返回:
- 跳跃等级
-
setJumpStrength
void setJumpStrength(double strength) 设置此马的跳跃强度.跳跃强度定义这匹马能跳多高. 更高的跳跃等级将增加跳跃高度. 设置为0将导致马无法跳跃. 只能设置0至2之间的数值.
原文: 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.
- 参数:
strength
- 跳跃等级
-
isEatingHaystack
boolean isEatingHaystack()Gets whether the horse is currently grazing hay.- 返回:
- true if eating hay
-
setEatingHaystack
void setEatingHaystack(boolean eatingHaystack) Sets whether the horse is grazing hay.- 参数:
eatingHaystack
- new hay grazing status
-
getInventory
从接口复制的说明:InventoryHolder
获取该对象的用户界面项目.原文:Get the object's inventory.
- 指定者:
getInventory
在接口中InventoryHolder
- 返回:
- The inventory.
-