Package be.seeseemelk.mockbukkit.entity
Class HumanEntityMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.LivingEntityMock
be.seeseemelk.mockbukkit.entity.HumanEntityMock
- 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,AnimalTamer,Damageable,Entity,HumanEntity,LivingEntity,InventoryHolder,Metadatable,Nameable,Permissible,ServerOperator,PersistentDataHolder,ProjectileSource
- Direct Known Subclasses:
PlayerMock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot -
Field Summary
FieldsFields inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
alive, attributes, health -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHumanEntityMock(@NotNull ServerMock server, @NotNull UUID uuid) -
Method Summary
Modifier and TypeMethodDescriptionvoidassertGameMode(GameMode expectedGamemode) Assert that the player is in a specific gamemode.voidvoidcloseInventory(@NotNull InventoryCloseEvent.Reason reason) booleandiscoverRecipe(@NotNull NamespacedKey recipe) intdiscoverRecipes(@NotNull Collection<NamespacedKey> recipes) booleandropItem(boolean dropAll) float@NotNull LocationintgetCooldown(@NotNull Material material) @NotNull Set<NamespacedKey>floatint@Nullable FishHookint@NotNull GameMode@NotNull PlayerInventory@NotNull ItemStack@Nullable ItemStack@NotNull ItemStack@Nullable Location@NotNull InventoryView@Nullable LocationintfloatintintintbooleanhasCooldown(@NotNull Material material) booleanhasDiscoveredRecipe(@NotNull NamespacedKey recipe) booleanbooleanbooleanboolean@Nullable InventoryView@Nullable InventoryViewopenCartographyTable(@Nullable Location location, boolean force) openEnchanting(Location location, boolean force) @Nullable InventoryViewopenGrindstone(@Nullable Location location, boolean force) openInventory(@NotNull Inventory inventory) voidopenInventory(@NotNull InventoryView inventory) @Nullable InventoryViewopenMerchant(@NotNull Villager trader, boolean force) openMerchant(@NotNull Merchant merchant, boolean force) void@Nullable InventoryViewopenSmithingTable(@Nullable Location location, boolean force) @Nullable InventoryViewopenStonecutter(@Nullable Location location, boolean force) openWorkbench(Location location, boolean force) @Nullable Entity@Nullable EntityvoidsetCooldown(@NotNull Material material, int ticks) voidsetExhaustion(float value) voidsetFoodLevel(int foodLevel) voidsetGameMode(@NotNull GameMode mode) voidsetItemInHand(@Nullable ItemStack item) voidsetItemOnCursor(@Nullable ItemStack item) voidsetLastDeathLocation(@Nullable Location location) voidsetSaturatedRegenRate(int ticks) voidsetSaturation(float value) voidsetShoulderEntityLeft(Entity entity) voidsetShoulderEntityRight(Entity entity) voidsetStarvationRate(int ticks) voidsetUnsaturatedRegenRate(int ticks) booleansetWindowProperty(InventoryView.Property prop, int value) booleanbooleanundiscoverRecipe(@NotNull NamespacedKey recipe) intundiscoverRecipes(@NotNull Collection<NamespacedKey> recipes) voidwakeup(boolean setSpawnLocation) Methods inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, damage, damage, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, getHandRaisedTime, getHealth, getHurtDirection, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isDead, isGliding, isInvisible, isJumping, isLeashed, isRiptiding, isSwimming, isValid, launchProjectile, launchProjectile, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, registerAttribute, remove, removePotionEffect, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setGliding, setHealth, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHand, teleportMethods 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 org.bukkit.entity.AnimalTamer
getUniqueIdMethods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttributeMethods 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
name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods 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, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, 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, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.entity.HumanEntity
getEnderChest, getEquipment, getMainHand, getNameMethods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, getHandRaisedTime, getHurtDirection, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isJumping, isLeashed, isRiptiding, isSwimming, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHandMethods 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.projectiles.ProjectileSource
launchProjectile, launchProjectileMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Field Details
-
expLevel
protected int expLevel
-
-
Constructor Details
-
HumanEntityMock
-
-
Method Details
-
assertGameMode
Assert that the player is in a specific gamemode.- Parameters:
expectedGamemode- The gamemode the player should be in.
-
getInventory
- Specified by:
getInventoryin interfaceHumanEntity- Specified by:
getInventoryin interfaceInventoryHolder
-
closeInventory
public void closeInventory()- Specified by:
closeInventoryin interfaceHumanEntity
-
closeInventory
- Specified by:
closeInventoryin interfaceHumanEntity
-
getOpenInventory
- Specified by:
getOpenInventoryin interfaceHumanEntity
-
openInventory
- Specified by:
openInventoryin interfaceHumanEntity
-
openInventory
- Specified by:
openInventoryin interfaceHumanEntity
-
getItemOnCursor
- Specified by:
getItemOnCursorin interfaceHumanEntity
-
setItemOnCursor
- Specified by:
setItemOnCursorin interfaceHumanEntity
-
getLastDeathLocation
- Specified by:
getLastDeathLocationin interfaceHumanEntity
-
setLastDeathLocation
- Specified by:
setLastDeathLocationin interfaceHumanEntity
-
getGameMode
- Specified by:
getGameModein interfaceHumanEntity
-
setGameMode
- Specified by:
setGameModein interfaceHumanEntity
-
setWindowProperty
- Specified by:
setWindowPropertyin interfaceHumanEntity
-
openWorkbench
- Specified by:
openWorkbenchin interfaceHumanEntity
-
openEnchanting
- Specified by:
openEnchantingin interfaceHumanEntity
-
openMerchant
- Specified by:
openMerchantin interfaceHumanEntity
-
openMerchant
- Specified by:
openMerchantin interfaceHumanEntity
-
openAnvil
@Nullable public @Nullable InventoryView openAnvil(@Nullable @Nullable Location location, boolean force) - Specified by:
openAnvilin interfaceHumanEntity
-
openCartographyTable
@Nullable public @Nullable InventoryView openCartographyTable(@Nullable @Nullable Location location, boolean force) - Specified by:
openCartographyTablein interfaceHumanEntity
-
openGrindstone
@Nullable public @Nullable InventoryView openGrindstone(@Nullable @Nullable Location location, boolean force) - Specified by:
openGrindstonein interfaceHumanEntity
-
openLoom
@Nullable public @Nullable InventoryView openLoom(@Nullable @Nullable Location location, boolean force) - Specified by:
openLoomin interfaceHumanEntity
-
openSmithingTable
@Nullable public @Nullable InventoryView openSmithingTable(@Nullable @Nullable Location location, boolean force) - Specified by:
openSmithingTablein interfaceHumanEntity
-
openStonecutter
@Nullable public @Nullable InventoryView openStonecutter(@Nullable @Nullable Location location, boolean force) - Specified by:
openStonecutterin interfaceHumanEntity
-
getItemInHand
- Specified by:
getItemInHandin interfaceHumanEntity
-
setItemInHand
- Specified by:
setItemInHandin interfaceHumanEntity
-
hasCooldown
- Specified by:
hasCooldownin interfaceHumanEntity
-
getCooldown
- Specified by:
getCooldownin interfaceHumanEntity
-
setCooldown
- Specified by:
setCooldownin interfaceHumanEntity
-
isDeeplySleeping
public boolean isDeeplySleeping()- Specified by:
isDeeplySleepingin interfaceHumanEntity
-
isSleeping
public boolean isSleeping()- Specified by:
isSleepingin interfaceLivingEntity- Overrides:
isSleepingin classLivingEntityMock
-
getSleepTicks
public int getSleepTicks()- Specified by:
getSleepTicksin interfaceHumanEntity
-
getPotentialBedLocation
- Specified by:
getPotentialBedLocationin interfaceHumanEntity
-
getFishHook
- Specified by:
getFishHookin interfaceHumanEntity
-
sleep
- Specified by:
sleepin interfaceHumanEntity
-
wakeup
public void wakeup(boolean setSpawnLocation) - Specified by:
wakeupin interfaceHumanEntity
-
getBedLocation
- Specified by:
getBedLocationin interfaceHumanEntity
-
isBlocking
public boolean isBlocking()- Specified by:
isBlockingin interfaceHumanEntity
-
isHandRaised
public boolean isHandRaised()- Specified by:
isHandRaisedin interfaceHumanEntity- Specified by:
isHandRaisedin interfaceLivingEntity- Overrides:
isHandRaisedin classLivingEntityMock
-
getItemInUse
- Specified by:
getItemInUsein interfaceHumanEntity
-
getExpToLevel
public int getExpToLevel()- Specified by:
getExpToLevelin interfaceHumanEntity
-
releaseLeftShoulderEntity
- Specified by:
releaseLeftShoulderEntityin interfaceHumanEntity
-
releaseRightShoulderEntity
- Specified by:
releaseRightShoulderEntityin interfaceHumanEntity
-
getAttackCooldown
public float getAttackCooldown()- Specified by:
getAttackCooldownin interfaceHumanEntity
-
discoverRecipe
- Specified by:
discoverRecipein interfaceHumanEntity
-
discoverRecipes
- Specified by:
discoverRecipesin interfaceHumanEntity
-
undiscoverRecipe
- Specified by:
undiscoverRecipein interfaceHumanEntity
-
undiscoverRecipes
- Specified by:
undiscoverRecipesin interfaceHumanEntity
-
hasDiscoveredRecipe
- Specified by:
hasDiscoveredRecipein interfaceHumanEntity
-
getDiscoveredRecipes
- Specified by:
getDiscoveredRecipesin interfaceHumanEntity
-
getShoulderEntityLeft
- Specified by:
getShoulderEntityLeftin interfaceHumanEntity
-
setShoulderEntityLeft
- Specified by:
setShoulderEntityLeftin interfaceHumanEntity
-
getShoulderEntityRight
- Specified by:
getShoulderEntityRightin interfaceHumanEntity
-
setShoulderEntityRight
- Specified by:
setShoulderEntityRightin interfaceHumanEntity
-
openSign
- Specified by:
openSignin interfaceHumanEntity
-
dropItem
public boolean dropItem(boolean dropAll) - Specified by:
dropItemin interfaceHumanEntity
-
getExhaustion
public float getExhaustion()- Specified by:
getExhaustionin interfaceHumanEntity
-
setExhaustion
public void setExhaustion(float value) - Specified by:
setExhaustionin interfaceHumanEntity
-
getSaturation
public float getSaturation()- Specified by:
getSaturationin interfaceHumanEntity
-
setSaturation
public void setSaturation(float value) - Specified by:
setSaturationin interfaceHumanEntity
-
getFoodLevel
public int getFoodLevel()- Specified by:
getFoodLevelin interfaceHumanEntity
-
setFoodLevel
public void setFoodLevel(int foodLevel) - Specified by:
setFoodLevelin interfaceHumanEntity
-
getSaturatedRegenRate
public int getSaturatedRegenRate()- Specified by:
getSaturatedRegenRatein interfaceHumanEntity
-
setSaturatedRegenRate
public void setSaturatedRegenRate(int ticks) - Specified by:
setSaturatedRegenRatein interfaceHumanEntity
-
getUnsaturatedRegenRate
public int getUnsaturatedRegenRate()- Specified by:
getUnsaturatedRegenRatein interfaceHumanEntity
-
setUnsaturatedRegenRate
public void setUnsaturatedRegenRate(int ticks) - Specified by:
setUnsaturatedRegenRatein interfaceHumanEntity
-
getStarvationRate
public int getStarvationRate()- Specified by:
getStarvationRatein interfaceHumanEntity
-
setStarvationRate
public void setStarvationRate(int ticks) - Specified by:
setStarvationRatein interfaceHumanEntity
-