public abstract class LivingEntityMock extends EntityMock implements org.bukkit.entity.LivingEntity
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
alive |
protected java.util.Map<org.bukkit.attribute.Attribute,AttributeInstanceMock> |
attributes |
protected double |
health |
| Constructor and Description |
|---|
LivingEntityMock(ServerMock server,
java.util.UUID uuid) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPotionEffect(org.bukkit.potion.PotionEffect effect) |
boolean |
addPotionEffect(org.bukkit.potion.PotionEffect effect,
boolean force)
Deprecated.
|
boolean |
addPotionEffects(java.util.Collection<org.bukkit.potion.PotionEffect> effects) |
void |
damage(double amount) |
void |
damage(double amount,
org.bukkit.entity.Entity source) |
java.util.Collection<org.bukkit.potion.PotionEffect> |
getActivePotionEffects() |
int |
getArrowCooldown() |
int |
getArrowsInBody() |
org.bukkit.attribute.AttributeInstance |
getAttribute(org.bukkit.attribute.Attribute attribute) |
boolean |
getCanPickupItems() |
org.bukkit.entity.EntityCategory |
getCategory() |
double |
getEyeHeight() |
double |
getEyeHeight(boolean ignorePose) |
org.bukkit.Location |
getEyeLocation() |
double |
getHealth() |
org.bukkit.entity.Player |
getKiller() |
double |
getLastDamage() |
java.util.List<org.bukkit.block.Block> |
getLastTwoTargetBlocks(java.util.Set<org.bukkit.Material> transparent,
int maxDistance) |
org.bukkit.entity.Entity |
getLeashHolder() |
java.util.List<org.bukkit.block.Block> |
getLineOfSight(java.util.Set<org.bukkit.Material> transparent,
int maxDistance) |
double |
getMaxHealth() |
int |
getMaximumAir() |
int |
getMaximumNoDamageTicks() |
int |
getNoDamageTicks() |
org.bukkit.potion.PotionEffect |
getPotionEffect(org.bukkit.potion.PotionEffectType type) |
int |
getRemainingAir() |
boolean |
getRemoveWhenFarAway() |
org.bukkit.block.Block |
getTargetBlock(java.util.Set<org.bukkit.Material> transparent,
int maxDistance) |
org.bukkit.block.Block |
getTargetBlockExact(int maxDistance) |
org.bukkit.block.Block |
getTargetBlockExact(int maxDistance,
org.bukkit.FluidCollisionMode fluidCollisionMode) |
boolean |
hasAI() |
boolean |
hasLineOfSight(org.bukkit.entity.Entity other) |
boolean |
hasPotionEffect(org.bukkit.potion.PotionEffectType type) |
boolean |
isCollidable() |
boolean |
isDead() |
boolean |
isGliding() |
boolean |
isInvisible() |
boolean |
isLeashed() |
boolean |
isRiptiding() |
boolean |
isSwimming() |
<T extends org.bukkit.entity.Projectile> |
launchProjectile(java.lang.Class<? extends T> projectile) |
<T extends org.bukkit.entity.Projectile> |
launchProjectile(java.lang.Class<? extends T> projectile,
org.bukkit.util.Vector velocity) |
org.bukkit.util.RayTraceResult |
rayTraceBlocks(double maxDistance) |
org.bukkit.util.RayTraceResult |
rayTraceBlocks(double maxDistance,
org.bukkit.FluidCollisionMode fluidCollisionMode) |
void |
removePotionEffect(org.bukkit.potion.PotionEffectType type) |
void |
resetMaxHealth() |
void |
setAI(boolean ai) |
void |
setArrowCooldown(int ticks) |
void |
setArrowsInBody(int count) |
void |
setCanPickupItems(boolean pickup) |
void |
setCollidable(boolean collidable) |
void |
setGliding(boolean gliding) |
void |
setHealth(double health) |
void |
setInvisible(boolean invisible) |
void |
setLastDamage(double damage) |
boolean |
setLeashHolder(org.bukkit.entity.Entity holder) |
void |
setMaxHealth(double health) |
void |
setMaximumAir(int ticks) |
void |
setMaximumNoDamageTicks(int ticks) |
void |
setNoDamageTicks(int ticks) |
void |
setRemainingAir(int ticks) |
void |
setRemoveWhenFarAway(boolean remove) |
void |
setSwimming(boolean swimming) |
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, assertLocation, assertNotTeleported, assertTeleported, clearTeleported, eject, equals, getBoundingBox, getCustomName, getEffectivePermissions, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMetadata, getName, getNearbyEntities, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTeleportCause, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, hashCode, hasMetadata, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isSilent, isValid, leaveVehicle, nextMessage, playEffect, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setLocation, setMetadata, setName, setOp, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleportsendMessage, sendMessage, sendMessage, sendMessageclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitattack, getCollidableExemptions, getEquipment, getMemory, isSleeping, setMemory, swingMainHand, swingOffHandgetAbsorptionAmount, setAbsorptionAmountaddPassenger, 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, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isInWater, 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, teleportgetMetadata, hasMetadata, removeMetadata, setMetadatagetName, sendMessage, sendMessage, sendMessage, sendMessageaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentgetPersistentDataContainerassertNoMoreSaid, assertSaidprotected double health
protected boolean alive
protected java.util.Map<org.bukkit.attribute.Attribute,AttributeInstanceMock> attributes
public LivingEntityMock(ServerMock server, java.util.UUID uuid)
public double getHealth()
getHealth in interface org.bukkit.entity.Damageablepublic boolean isDead()
isDead in interface org.bukkit.entity.EntityisDead in class EntityMockpublic void setHealth(double health)
setHealth in interface org.bukkit.entity.Damageablepublic double getMaxHealth()
getMaxHealth in interface org.bukkit.entity.Damageablepublic void setMaxHealth(double health)
setMaxHealth in interface org.bukkit.entity.Damageablepublic void resetMaxHealth()
resetMaxHealth in interface org.bukkit.entity.Damageablepublic void damage(double amount)
damage in interface org.bukkit.entity.Damageablepublic void damage(double amount,
org.bukkit.entity.Entity source)
damage in interface org.bukkit.entity.Damageablepublic org.bukkit.attribute.AttributeInstance getAttribute(org.bukkit.attribute.Attribute attribute)
getAttribute in interface org.bukkit.attribute.Attributablepublic <T extends org.bukkit.entity.Projectile> T launchProjectile(java.lang.Class<? extends T> projectile)
launchProjectile in interface org.bukkit.projectiles.ProjectileSourcepublic <T extends org.bukkit.entity.Projectile> T launchProjectile(java.lang.Class<? extends T> projectile,
org.bukkit.util.Vector velocity)
launchProjectile in interface org.bukkit.projectiles.ProjectileSourcepublic double getEyeHeight()
getEyeHeight in interface org.bukkit.entity.LivingEntitypublic double getEyeHeight(boolean ignorePose)
getEyeHeight in interface org.bukkit.entity.LivingEntitypublic org.bukkit.Location getEyeLocation()
getEyeLocation in interface org.bukkit.entity.LivingEntitypublic java.util.List<org.bukkit.block.Block> getLineOfSight(java.util.Set<org.bukkit.Material> transparent,
int maxDistance)
getLineOfSight in interface org.bukkit.entity.LivingEntitypublic org.bukkit.block.Block getTargetBlock(java.util.Set<org.bukkit.Material> transparent,
int maxDistance)
getTargetBlock in interface org.bukkit.entity.LivingEntitypublic java.util.List<org.bukkit.block.Block> getLastTwoTargetBlocks(java.util.Set<org.bukkit.Material> transparent,
int maxDistance)
getLastTwoTargetBlocks in interface org.bukkit.entity.LivingEntitypublic org.bukkit.block.Block getTargetBlockExact(int maxDistance)
getTargetBlockExact in interface org.bukkit.entity.LivingEntitypublic org.bukkit.block.Block getTargetBlockExact(int maxDistance,
org.bukkit.FluidCollisionMode fluidCollisionMode)
getTargetBlockExact in interface org.bukkit.entity.LivingEntitypublic org.bukkit.util.RayTraceResult rayTraceBlocks(double maxDistance)
rayTraceBlocks in interface org.bukkit.entity.LivingEntitypublic org.bukkit.util.RayTraceResult rayTraceBlocks(double maxDistance,
org.bukkit.FluidCollisionMode fluidCollisionMode)
rayTraceBlocks in interface org.bukkit.entity.LivingEntitypublic int getRemainingAir()
getRemainingAir in interface org.bukkit.entity.LivingEntitypublic void setRemainingAir(int ticks)
setRemainingAir in interface org.bukkit.entity.LivingEntitypublic int getMaximumAir()
getMaximumAir in interface org.bukkit.entity.LivingEntitypublic void setMaximumAir(int ticks)
setMaximumAir in interface org.bukkit.entity.LivingEntitypublic int getMaximumNoDamageTicks()
getMaximumNoDamageTicks in interface org.bukkit.entity.LivingEntitypublic void setMaximumNoDamageTicks(int ticks)
setMaximumNoDamageTicks in interface org.bukkit.entity.LivingEntitypublic double getLastDamage()
getLastDamage in interface org.bukkit.entity.LivingEntitypublic void setLastDamage(double damage)
setLastDamage in interface org.bukkit.entity.LivingEntitypublic int getNoDamageTicks()
getNoDamageTicks in interface org.bukkit.entity.LivingEntitypublic void setNoDamageTicks(int ticks)
setNoDamageTicks in interface org.bukkit.entity.LivingEntitypublic org.bukkit.entity.Player getKiller()
getKiller in interface org.bukkit.entity.LivingEntitypublic boolean addPotionEffect(org.bukkit.potion.PotionEffect effect)
addPotionEffect in interface org.bukkit.entity.LivingEntity@Deprecated
public boolean addPotionEffect(org.bukkit.potion.PotionEffect effect,
boolean force)
addPotionEffect in interface org.bukkit.entity.LivingEntitypublic boolean addPotionEffects(java.util.Collection<org.bukkit.potion.PotionEffect> effects)
addPotionEffects in interface org.bukkit.entity.LivingEntitypublic boolean hasPotionEffect(org.bukkit.potion.PotionEffectType type)
hasPotionEffect in interface org.bukkit.entity.LivingEntitypublic org.bukkit.potion.PotionEffect getPotionEffect(org.bukkit.potion.PotionEffectType type)
getPotionEffect in interface org.bukkit.entity.LivingEntitypublic void removePotionEffect(org.bukkit.potion.PotionEffectType type)
removePotionEffect in interface org.bukkit.entity.LivingEntitypublic java.util.Collection<org.bukkit.potion.PotionEffect> getActivePotionEffects()
getActivePotionEffects in interface org.bukkit.entity.LivingEntitypublic boolean hasLineOfSight(org.bukkit.entity.Entity other)
hasLineOfSight in interface org.bukkit.entity.LivingEntitypublic boolean getRemoveWhenFarAway()
getRemoveWhenFarAway in interface org.bukkit.entity.LivingEntitypublic void setRemoveWhenFarAway(boolean remove)
setRemoveWhenFarAway in interface org.bukkit.entity.LivingEntitypublic void setCanPickupItems(boolean pickup)
setCanPickupItems in interface org.bukkit.entity.LivingEntitypublic boolean getCanPickupItems()
getCanPickupItems in interface org.bukkit.entity.LivingEntitypublic boolean isLeashed()
isLeashed in interface org.bukkit.entity.LivingEntitypublic org.bukkit.entity.Entity getLeashHolder()
throws java.lang.IllegalStateException
getLeashHolder in interface org.bukkit.entity.LivingEntityjava.lang.IllegalStateExceptionpublic boolean setLeashHolder(org.bukkit.entity.Entity holder)
setLeashHolder in interface org.bukkit.entity.LivingEntitypublic boolean isGliding()
isGliding in interface org.bukkit.entity.LivingEntitypublic void setGliding(boolean gliding)
setGliding in interface org.bukkit.entity.LivingEntitypublic boolean isSwimming()
isSwimming in interface org.bukkit.entity.LivingEntitypublic void setSwimming(boolean swimming)
setSwimming in interface org.bukkit.entity.LivingEntitypublic boolean isRiptiding()
isRiptiding in interface org.bukkit.entity.LivingEntitypublic void setAI(boolean ai)
setAI in interface org.bukkit.entity.LivingEntitypublic boolean hasAI()
hasAI in interface org.bukkit.entity.LivingEntitypublic void setCollidable(boolean collidable)
setCollidable in interface org.bukkit.entity.LivingEntitypublic boolean isCollidable()
isCollidable in interface org.bukkit.entity.LivingEntitypublic org.bukkit.entity.EntityCategory getCategory()
getCategory in interface org.bukkit.entity.LivingEntitypublic void setArrowsInBody(int count)
setArrowsInBody in interface org.bukkit.entity.LivingEntitypublic int getArrowsInBody()
getArrowsInBody in interface org.bukkit.entity.LivingEntitypublic void setArrowCooldown(int ticks)
setArrowCooldown in interface org.bukkit.entity.LivingEntitypublic int getArrowCooldown()
getArrowCooldown in interface org.bukkit.entity.LivingEntitypublic void setInvisible(boolean invisible)
setInvisible in interface org.bukkit.entity.LivingEntitypublic boolean isInvisible()
isInvisible in interface org.bukkit.entity.LivingEntity