org.bukkit.entity
Interface Creature

All Superinterfaces:
Damageable, Entity, LivingEntity, Metadatable
All Known Subinterfaces:
Ageable, Animals, Blaze, CaveSpider, Chicken, Cow, Creeper, Enderman, Giant, Golem, IronGolem, Monster, MushroomCow, NPC, Ocelot, Pig, PigZombie, Sheep, Silverfish, Skeleton, Snowman, Spider, Squid, Villager, WaterMob, Witch, Wither, Wolf, Zombie

public interface Creature
extends LivingEntity

Represents a Creature. Creatures are non-intelligent monsters or animals which have very simple abilities.


Method Summary
 LivingEntity getTarget()
          Gets the current target of this Creature
 void setTarget(LivingEntity target)
          Instructs this Creature to set the specified LivingEntity as its target.
 
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getCustomName, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, hasLineOfSight, hasPotionEffect, isCustomNameVisible, launchProjectile, removePotionEffect, setCanPickupItems, setCustomName, setCustomNameVisible, setLastDamage, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, shootArrow, throwEgg, throwSnowball
 
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth
 

Method Detail

setTarget

void setTarget(LivingEntity target)
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


Copyright © 2013. All Rights Reserved.