Package org.bukkit.entity
Interface Creature
- All Superinterfaces:
CommandSender
,Damageable
,Entity
,LivingEntity
,Metadatable
,Permissible
,ProjectileSource
,ServerOperator
- All Known Subinterfaces:
Ageable
,Animals
,Blaze
,CaveSpider
,Chicken
,Cow
,Creeper
,Enderman
,Endermite
,Giant
,Golem
,Guardian
,Horse
,IronGolem
,Monster
,MushroomCow
,NPC
,Ocelot
,Pig
,PigZombie
,Rabbit
,Sheep
,Silverfish
,Skeleton
,Snowman
,Spider
,Villager
,Witch
,Wither
,Wolf
,Zombie
public interface Creature extends LivingEntity
Represents a Creature. Creatures are non-intelligent monsters or animals
which have very simple abilities.
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description LivingEntity
getTarget()
Gets the current target of this Creaturevoid
setTarget(LivingEntity target)
Instructs this Creature to set the specified LivingEntity as its target.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, getCustomName, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWorld, isCustomNameVisible, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.entity.LivingEntity
_INVALID_getLastDamage, _INVALID_setLastDamage, addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlock, hasLineOfSight, hasPotionEffect, isLeashed, removePotionEffect, setCanPickupItems, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, shootArrow, throwEgg, throwSnowball
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.projectiles.ProjectileSource
launchProjectile, launchProjectile
-
Method Details
-
setTarget
Instructs this Creature to set the specified LivingEntity as its target.Hostile creatures may attack their target, and friendly creatures may follow their target.
- Parameters:
target
- New LivingEntity to target, or null to clear the target
-
getTarget
LivingEntity getTarget()Gets the current target of this Creature- Returns:
- Current target of this creature, or null if none exists
-