Package org.bukkit.entity
Interface Tameable
-
- All Superinterfaces:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
- All Known Subinterfaces:
AbstractHorse
,Cat
,ChestedHorse
,Donkey
,Horse
,Llama
,Mule
,Parrot
,SkeletonHorse
,TraderLlama
,Wolf
,ZombieHorse
public interface Tameable extends Entity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AnimalTamer
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.-
Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage
-
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, getVelocity, 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, setVelocity, spigot, teleport, teleport, teleport, teleport
-
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
-
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.permissions.ServerOperator
isOp, setOp
-
-
-
-
Method Detail
-
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.
- Returns:
- 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.
- Parameters:
tame
- true if tame
-
getOwner
@Nullable AnimalTamer getOwner()
Gets the current owning AnimalTamer- Returns:
- the owning AnimalTamer, or null if not owned
-
setOwner
void setOwner(@Nullable AnimalTamer tamer)
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.
- Parameters:
tamer
- the AnimalTamer who should own this
-
-