Package be.seeseemelk.mockbukkit.entity
Class LivingEntityMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.LivingEntityMock
- All Implemented Interfaces:
MessageTarget,net.kyori.adventure.audience.Audience,net.kyori.adventure.pointer.Pointered,net.kyori.adventure.sound.Sound.Emitter,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>,Attributable,CommandSender,Damageable,Entity,LivingEntity,Metadatable,Nameable,Permissible,ServerOperator,PersistentDataHolder,ProjectileSource
- Direct Known Subclasses:
ArmorStandMock,HumanEntityMock,MobMock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Map<Attribute,AttributeInstanceMock> protected double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLivingEntityMock(@NotNull ServerMock server, @NotNull UUID uuid) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPotionEffect(@NotNull PotionEffect effect) booleanaddPotionEffect(@NotNull PotionEffect effect, boolean force) Deprecated.booleanaddPotionEffects(@NotNull Collection<PotionEffect> effects) voidvoidvoiddamage(double amount) voiddouble@Nullable ItemStack@NotNull Collection<PotionEffect>intintintgetAttribute(@NotNull Attribute attribute) intintboolean@NotNull EntityCategory@Nullable EntityEquipmentdoubledoublegetEyeHeight(boolean ignorePose) @NotNull Location@NotNull EquipmentSlotintdoublefloatint@Nullable PlayerdoublegetLastTwoTargetBlocks(Set<Material> transparent, int maxDistance) @NotNull EntitygetLineOfSight(Set<Material> transparent, int maxDistance) doubleintint<T> TintgetPotionEffect(@NotNull PotionEffectType type) intbooleanint@Nullable BlockgetTargetBlock(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) @NotNull BlockgetTargetBlock(Set<Material> transparent, int maxDistance) @Nullable BlockgetTargetBlockExact(int maxDistance) @Nullable BlockgetTargetBlockExact(int maxDistance, @NotNull FluidCollisionMode fluidCollisionMode) @Nullable BlockFacegetTargetBlockFace(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) @Nullable TargetBlockInfogetTargetBlockInfo(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) @Nullable EntitygetTargetEntity(int maxDistance, boolean ignoreBlocks) @Nullable TargetEntityInfogetTargetEntityInfo(int maxDistance, boolean ignoreBlocks) booleanhasAI()booleanhasLineOfSight(@NotNull Entity other) booleanhasLineOfSight(@NotNull Location location) booleanhasPotionEffect(@NotNull PotionEffectType type) booleanbooleanbooleanisDead()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisValid()<T extends Projectile>
TlaunchProjectile(@NotNull Class<? extends T> projectile) <T extends Projectile>
TlaunchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity) voidplayPickupItemAnimation(@NotNull Item item, int quantity) @Nullable RayTraceResultrayTraceBlocks(double maxDistance) @Nullable RayTraceResultrayTraceBlocks(double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode) voidregisterAttribute(@NotNull Attribute attribute) voidremove()voidremovePotionEffect(@NotNull PotionEffectType type) voidvoidsetAbsorptionAmount(double amount) voidsetAI(boolean ai) voidsetArrowCooldown(int ticks) voidsetArrowsInBody(int count) voidsetArrowsStuck(int arrows) voidsetBeeStingerCooldown(int ticks) voidsetBeeStingersInBody(int count) voidsetCanPickupItems(boolean pickup) voidsetCollidable(boolean collidable) voidsetGliding(boolean gliding) voidsetHealth(double health) voidsetHurtDirection(float hurtDirection) voidsetInvisible(boolean invisible) voidsetJumping(boolean jumping) voidvoidsetLastDamage(double damage) booleansetLeashHolder(Entity holder) voidsetMaxHealth(double health) voidsetMaximumAir(int ticks) voidsetMaximumNoDamageTicks(int ticks) <T> voidvoidsetNoDamageTicks(int ticks) voidsetRemainingAir(int ticks) voidsetRemoveWhenFarAway(boolean remove) voidsetShieldBlockingDelay(int delay) voidsetSwimming(boolean swimming) voidvoidbooleanteleport(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause) Methods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, clearTeleported, collidesAt, customName, customName, eject, equals, fromMobSpawner, getBoundingBox, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getMetadata, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardEntry, getScoreboardTags, getServer, getSpawnCategory, getTeleportCause, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, hashCode, hasMetadata, hasPassengers, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isSilent, isTicking, isVisualFire, leaveVehicle, lockFreezeTicks, name, nextComponentMessage, playEffect, recalculatePermissions, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setLocation, setMetadata, setName, setOp, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportWithoutEvent, wouldCollideUsingMethods inherited from class org.bukkit.command.CommandSender.Spigot
sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.entity.LivingEntity
getTargetBlock, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, playPickupItemAnimationMethods inherited from interface be.seeseemelk.mockbukkit.command.MessageTarget
assertNoMoreSaid, assertSaid, assertSaid, nextMessageMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Field Details
-
health
protected double health -
alive
protected boolean alive -
attributes
-
-
Constructor Details
-
LivingEntityMock
-
-
Method Details
-
getHealth
public double getHealth()- Specified by:
getHealthin interfaceDamageable
-
remove
public void remove()- Specified by:
removein interfaceEntity- Overrides:
removein classEntityMock
-
isDead
public boolean isDead()- Specified by:
isDeadin interfaceEntity- Overrides:
isDeadin classEntityMock
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceEntity- Overrides:
isValidin classEntityMock
-
setHealth
public void setHealth(double health) - Specified by:
setHealthin interfaceDamageable
-
getAbsorptionAmount
public double getAbsorptionAmount()- Specified by:
getAbsorptionAmountin interfaceDamageable
-
setAbsorptionAmount
public void setAbsorptionAmount(double amount) - Specified by:
setAbsorptionAmountin interfaceDamageable
-
getMaxHealth
public double getMaxHealth()- Specified by:
getMaxHealthin interfaceDamageable
-
setMaxHealth
public void setMaxHealth(double health) - Specified by:
setMaxHealthin interfaceDamageable
-
resetMaxHealth
public void resetMaxHealth()- Specified by:
resetMaxHealthin interfaceDamageable
-
damage
public void damage(double amount) - Specified by:
damagein interfaceDamageable
-
damage
- Specified by:
damagein interfaceDamageable
-
getAttribute
- Specified by:
getAttributein interfaceAttributable
-
registerAttribute
- Specified by:
registerAttributein interfaceAttributable
-
launchProjectile
@NotNull public <T extends Projectile> T launchProjectile(@NotNull @NotNull Class<? extends T> projectile) - Specified by:
launchProjectilein interfaceProjectileSource
-
launchProjectile
@NotNull public <T extends Projectile> T launchProjectile(@NotNull @NotNull Class<? extends T> projectile, @Nullable @Nullable Vector velocity) - Specified by:
launchProjectilein interfaceProjectileSource
-
getEyeHeight
public double getEyeHeight()- Specified by:
getEyeHeightin interfaceLivingEntity
-
getEyeHeight
public double getEyeHeight(boolean ignorePose) - Specified by:
getEyeHeightin interfaceLivingEntity
-
getEyeLocation
- Specified by:
getEyeLocationin interfaceLivingEntity
-
getLineOfSight
- Specified by:
getLineOfSightin interfaceLivingEntity
-
getTargetBlock
- Specified by:
getTargetBlockin interfaceLivingEntity
-
getTargetBlock
@Nullable public @Nullable Block getTargetBlock(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) - Specified by:
getTargetBlockin interfaceLivingEntity
-
getTargetBlockFace
@Nullable public @Nullable BlockFace getTargetBlockFace(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) - Specified by:
getTargetBlockFacein interfaceLivingEntity
-
getTargetBlockInfo
@Nullable public @Nullable TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull TargetBlockInfo.FluidMode fluidMode) - Specified by:
getTargetBlockInfoin interfaceLivingEntity
-
getTargetEntity
- Specified by:
getTargetEntityin interfaceLivingEntity
-
getTargetEntityInfo
@Nullable public @Nullable TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks) - Specified by:
getTargetEntityInfoin interfaceLivingEntity
-
getLastTwoTargetBlocks
@NotNull public @NotNull List<Block> getLastTwoTargetBlocks(Set<Material> transparent, int maxDistance) - Specified by:
getLastTwoTargetBlocksin interfaceLivingEntity
-
getTargetBlockExact
- Specified by:
getTargetBlockExactin interfaceLivingEntity
-
getTargetBlockExact
@Nullable public @Nullable Block getTargetBlockExact(int maxDistance, @NotNull @NotNull FluidCollisionMode fluidCollisionMode) - Specified by:
getTargetBlockExactin interfaceLivingEntity
-
rayTraceBlocks
- Specified by:
rayTraceBlocksin interfaceLivingEntity
-
rayTraceBlocks
@Nullable public @Nullable RayTraceResult rayTraceBlocks(double maxDistance, @NotNull @NotNull FluidCollisionMode fluidCollisionMode) - Specified by:
rayTraceBlocksin interfaceLivingEntity
-
getRemainingAir
public int getRemainingAir()- Specified by:
getRemainingAirin interfaceLivingEntity
-
setRemainingAir
public void setRemainingAir(int ticks) - Specified by:
setRemainingAirin interfaceLivingEntity
-
getMaximumAir
public int getMaximumAir()- Specified by:
getMaximumAirin interfaceLivingEntity
-
setMaximumAir
public void setMaximumAir(int ticks) - Specified by:
setMaximumAirin interfaceLivingEntity
-
getMaximumNoDamageTicks
public int getMaximumNoDamageTicks()- Specified by:
getMaximumNoDamageTicksin interfaceLivingEntity
-
setMaximumNoDamageTicks
public void setMaximumNoDamageTicks(int ticks) - Specified by:
setMaximumNoDamageTicksin interfaceLivingEntity
-
getLastDamage
public double getLastDamage()- Specified by:
getLastDamagein interfaceLivingEntity
-
setLastDamage
public void setLastDamage(double damage) - Specified by:
setLastDamagein interfaceLivingEntity
-
getNoDamageTicks
public int getNoDamageTicks()- Specified by:
getNoDamageTicksin interfaceLivingEntity
-
setNoDamageTicks
public void setNoDamageTicks(int ticks) - Specified by:
setNoDamageTicksin interfaceLivingEntity
-
getKiller
- Specified by:
getKillerin interfaceLivingEntity
-
setKiller
- Specified by:
setKillerin interfaceLivingEntity
-
addPotionEffect
- Specified by:
addPotionEffectin interfaceLivingEntity
-
addPotionEffect
Deprecated.- Specified by:
addPotionEffectin interfaceLivingEntity
-
addPotionEffects
- Specified by:
addPotionEffectsin interfaceLivingEntity
-
hasPotionEffect
- Specified by:
hasPotionEffectin interfaceLivingEntity
-
getPotionEffect
- Specified by:
getPotionEffectin interfaceLivingEntity
-
removePotionEffect
- Specified by:
removePotionEffectin interfaceLivingEntity
-
getActivePotionEffects
- Specified by:
getActivePotionEffectsin interfaceLivingEntity
-
hasLineOfSight
- Specified by:
hasLineOfSightin interfaceLivingEntity
-
hasLineOfSight
- Specified by:
hasLineOfSightin interfaceLivingEntity
-
getRemoveWhenFarAway
public boolean getRemoveWhenFarAway()- Specified by:
getRemoveWhenFarAwayin interfaceLivingEntity
-
setRemoveWhenFarAway
public void setRemoveWhenFarAway(boolean remove) - Specified by:
setRemoveWhenFarAwayin interfaceLivingEntity
-
getEquipment
- Specified by:
getEquipmentin interfaceLivingEntity
-
setCanPickupItems
public void setCanPickupItems(boolean pickup) - Specified by:
setCanPickupItemsin interfaceLivingEntity
-
getCanPickupItems
public boolean getCanPickupItems()- Specified by:
getCanPickupItemsin interfaceLivingEntity
-
teleport
public boolean teleport(@NotNull @NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause) - Specified by:
teleportin interfaceEntity- Overrides:
teleportin classEntityMock
-
isLeashed
public boolean isLeashed()- Specified by:
isLeashedin interfaceLivingEntity
-
getLeashHolder
- Specified by:
getLeashHolderin interfaceLivingEntity- Throws:
IllegalStateException
-
setLeashHolder
- Specified by:
setLeashHolderin interfaceLivingEntity
-
isGliding
public boolean isGliding()- Specified by:
isGlidingin interfaceLivingEntity
-
setGliding
public void setGliding(boolean gliding) - Specified by:
setGlidingin interfaceLivingEntity
-
isSwimming
public boolean isSwimming()- Specified by:
isSwimmingin interfaceLivingEntity
-
setSwimming
public void setSwimming(boolean swimming) - Specified by:
setSwimmingin interfaceLivingEntity
-
isRiptiding
public boolean isRiptiding()- Specified by:
isRiptidingin interfaceLivingEntity
-
isSleeping
public boolean isSleeping()- Specified by:
isSleepingin interfaceLivingEntity
-
isClimbing
public boolean isClimbing()- Specified by:
isClimbingin interfaceLivingEntity
-
setAI
public void setAI(boolean ai) - Specified by:
setAIin interfaceLivingEntity
-
hasAI
public boolean hasAI()- Specified by:
hasAIin interfaceLivingEntity
-
attack
- Specified by:
attackin interfaceLivingEntity
-
swingMainHand
public void swingMainHand()- Specified by:
swingMainHandin interfaceLivingEntity
-
swingOffHand
public void swingOffHand()- Specified by:
swingOffHandin interfaceLivingEntity
-
setCollidable
public void setCollidable(boolean collidable) - Specified by:
setCollidablein interfaceLivingEntity
-
isCollidable
public boolean isCollidable()- Specified by:
isCollidablein interfaceLivingEntity
-
getCollidableExemptions
- Specified by:
getCollidableExemptionsin interfaceLivingEntity
-
getMemory
- Specified by:
getMemoryin interfaceLivingEntity
-
setMemory
- Specified by:
setMemoryin interfaceLivingEntity
-
getCategory
- Specified by:
getCategoryin interfaceLivingEntity
-
setArrowsInBody
public void setArrowsInBody(int count) - Specified by:
setArrowsInBodyin interfaceLivingEntity
-
getBeeStingerCooldown
public int getBeeStingerCooldown()- Specified by:
getBeeStingerCooldownin interfaceLivingEntity
-
setBeeStingerCooldown
public void setBeeStingerCooldown(int ticks) - Specified by:
setBeeStingerCooldownin interfaceLivingEntity
-
getBeeStingersInBody
public int getBeeStingersInBody()- Specified by:
getBeeStingersInBodyin interfaceLivingEntity
-
setBeeStingersInBody
public void setBeeStingersInBody(int count) - Specified by:
setBeeStingersInBodyin interfaceLivingEntity
-
getArrowsInBody
public int getArrowsInBody()- Specified by:
getArrowsInBodyin interfaceLivingEntity
-
setArrowCooldown
public void setArrowCooldown(int ticks) - Specified by:
setArrowCooldownin interfaceLivingEntity
-
getArrowCooldown
public int getArrowCooldown()- Specified by:
getArrowCooldownin interfaceLivingEntity
-
setInvisible
public void setInvisible(boolean invisible) - Specified by:
setInvisiblein interfaceLivingEntity
-
isInvisible
public boolean isInvisible()- Specified by:
isInvisiblein interfaceLivingEntity
-
getArrowsStuck
public int getArrowsStuck()- Specified by:
getArrowsStuckin interfaceLivingEntity
-
setArrowsStuck
public void setArrowsStuck(int arrows) - Specified by:
setArrowsStuckin interfaceLivingEntity
-
getShieldBlockingDelay
public int getShieldBlockingDelay()- Specified by:
getShieldBlockingDelayin interfaceLivingEntity
-
setShieldBlockingDelay
public void setShieldBlockingDelay(int delay) - Specified by:
setShieldBlockingDelayin interfaceLivingEntity
-
getActiveItem
- Specified by:
getActiveItemin interfaceLivingEntity
-
clearActiveItem
public void clearActiveItem()- Specified by:
clearActiveItemin interfaceLivingEntity
-
getItemUseRemainingTime
public int getItemUseRemainingTime()- Specified by:
getItemUseRemainingTimein interfaceLivingEntity
-
getHandRaisedTime
public int getHandRaisedTime()- Specified by:
getHandRaisedTimein interfaceLivingEntity
-
isHandRaised
public boolean isHandRaised()- Specified by:
isHandRaisedin interfaceLivingEntity
-
getHandRaised
- Specified by:
getHandRaisedin interfaceLivingEntity
-
isJumping
public boolean isJumping()- Specified by:
isJumpingin interfaceLivingEntity
-
setJumping
public void setJumping(boolean jumping) - Specified by:
setJumpingin interfaceLivingEntity
-
playPickupItemAnimation
- Specified by:
playPickupItemAnimationin interfaceLivingEntity
-
getHurtDirection
public float getHurtDirection()- Specified by:
getHurtDirectionin interfaceLivingEntity
-
setHurtDirection
public void setHurtDirection(float hurtDirection) - Specified by:
setHurtDirectionin interfaceLivingEntity
-