接口 Tameable
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,ServerOperator
- 所有已知子接口:
AbstractHorse
,ChestedHorse
,Donkey
,Horse
,Llama
,Mule
,Ocelot
,Parrot
,SkeletonHorse
,Wolf
,ZombieHorse
-
方法概要
修饰符和类型方法说明getOwner()
Gets the current owning AnimalTamerboolean
isTamed()
Check if this is tamedvoid
setOwner
(AnimalTamer tamer) Set this to be owned by given AnimalTamer.void
setTamed
(boolean tame) Sets if this has been tamed.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage
从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
从接口继承的方法 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.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
isTamed
boolean isTamed()Check if this is tamedIf something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
- 返回:
- true if this has been tamed
-
setTamed
void setTamed(boolean tame) Sets if this has been tamed. Not necessary if the method setOwner has been used, as it tames automatically.If something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
- 参数:
tame
- true if tame
-
getOwner
AnimalTamer getOwner()Gets the current owning AnimalTamer- 返回:
- the owning AnimalTamer, or null if not owned
-
setOwner
Set this to be owned by given AnimalTamer.If the owner is not null, this will be tamed and will have any current path it is following removed. If the owner is set to null, this will be untamed, and the current owner removed.
- 参数:
tamer
- the AnimalTamer who should own this
-