Class HumanEntityMock

java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
All Implemented Interfaces:
MessageTarget, io.papermc.paper.entity.Frictional, 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>, org.bukkit.attribute.Attributable, org.bukkit.command.CommandSender, org.bukkit.entity.AnimalTamer, org.bukkit.entity.Damageable, org.bukkit.entity.Entity, org.bukkit.entity.HumanEntity, org.bukkit.entity.LivingEntity, org.bukkit.inventory.InventoryHolder, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder, org.bukkit.projectiles.ProjectileSource
Direct Known Subclasses:
PlayerMock

public abstract class HumanEntityMock extends LivingEntityMock implements org.bukkit.entity.HumanEntity
Mock implementation of a HumanEntity.
See Also:
  • Field Details

    • expLevel

      protected int expLevel
      How much EXP this HumanEntity has.
    • blocking

      protected boolean blocking
  • Constructor Details

    • HumanEntityMock

      protected HumanEntityMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid)
      Constructs a new HumanEntityMock on the provided ServerMock with a specified UUID.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
  • Method Details

    • assertGameMode

      public void assertGameMode(org.bukkit.GameMode expectedGamemode)
      Assert that the player is in a specific gamemode.
      Parameters:
      expectedGamemode - The gamemode the player should be in.
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.PlayerInventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.entity.HumanEntity
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
    • getEnderChest

      @NotNull public @NotNull org.bukkit.inventory.Inventory getEnderChest()
      Specified by:
      getEnderChest in interface org.bukkit.entity.HumanEntity
    • getMainHand

      @NotNull public @NotNull org.bukkit.inventory.MainHand getMainHand()
      Specified by:
      getMainHand in interface org.bukkit.entity.HumanEntity
    • closeInventory

      public void closeInventory()
      Specified by:
      closeInventory in interface org.bukkit.entity.HumanEntity
    • closeInventory

      public void closeInventory(@NotNull org.bukkit.event.inventory.InventoryCloseEvent.Reason reason)
      Specified by:
      closeInventory in interface org.bukkit.entity.HumanEntity
    • getOpenInventory

      @NotNull public @NotNull org.bukkit.inventory.InventoryView getOpenInventory()
      Specified by:
      getOpenInventory in interface org.bukkit.entity.HumanEntity
    • openInventory

      public void openInventory(@NotNull @NotNull org.bukkit.inventory.InventoryView inventory)
      Specified by:
      openInventory in interface org.bukkit.entity.HumanEntity
    • openInventory

      public org.bukkit.inventory.InventoryView openInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory)
      Specified by:
      openInventory in interface org.bukkit.entity.HumanEntity
    • getItemOnCursor

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getItemOnCursor()
      Specified by:
      getItemOnCursor in interface org.bukkit.entity.HumanEntity
    • setItemOnCursor

      public void setItemOnCursor(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Specified by:
      setItemOnCursor in interface org.bukkit.entity.HumanEntity
    • getLastDeathLocation

      @Nullable public @Nullable org.bukkit.Location getLastDeathLocation()
      Specified by:
      getLastDeathLocation in interface org.bukkit.entity.HumanEntity
    • setLastDeathLocation

      public void setLastDeathLocation(@Nullable @Nullable org.bukkit.Location location)
      Specified by:
      setLastDeathLocation in interface org.bukkit.entity.HumanEntity
    • fireworkBoost

      @Nullable public @Nullable org.bukkit.entity.Firework fireworkBoost(@NotNull @NotNull org.bukkit.inventory.ItemStack fireworkItemStack)
      Specified by:
      fireworkBoost in interface org.bukkit.entity.HumanEntity
    • getGameMode

      @NotNull public @NotNull org.bukkit.GameMode getGameMode()
      Specified by:
      getGameMode in interface org.bukkit.entity.HumanEntity
    • setGameMode

      public void setGameMode(@NotNull @NotNull org.bukkit.GameMode mode)
      Specified by:
      setGameMode in interface org.bukkit.entity.HumanEntity
    • setWindowProperty

      public boolean setWindowProperty(@NotNull org.bukkit.inventory.InventoryView.Property prop, int value)
      Specified by:
      setWindowProperty in interface org.bukkit.entity.HumanEntity
    • getEnchantmentSeed

      public int getEnchantmentSeed()
      Specified by:
      getEnchantmentSeed in interface org.bukkit.entity.HumanEntity
    • setEnchantmentSeed

      public void setEnchantmentSeed(int seed)
      Specified by:
      setEnchantmentSeed in interface org.bukkit.entity.HumanEntity
    • openWorkbench

      public org.bukkit.inventory.InventoryView openWorkbench(org.bukkit.Location location, boolean force)
      Specified by:
      openWorkbench in interface org.bukkit.entity.HumanEntity
    • openEnchanting

      public org.bukkit.inventory.InventoryView openEnchanting(org.bukkit.Location location, boolean force)
      Specified by:
      openEnchanting in interface org.bukkit.entity.HumanEntity
    • openMerchant

      public org.bukkit.inventory.InventoryView openMerchant(@NotNull @NotNull org.bukkit.entity.Villager trader, boolean force)
      Specified by:
      openMerchant in interface org.bukkit.entity.HumanEntity
    • openMerchant

      public org.bukkit.inventory.InventoryView openMerchant(@NotNull @NotNull org.bukkit.inventory.Merchant merchant, boolean force)
      Specified by:
      openMerchant in interface org.bukkit.entity.HumanEntity
    • openAnvil

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openAnvil(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openAnvil in interface org.bukkit.entity.HumanEntity
    • openCartographyTable

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openCartographyTable(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openCartographyTable in interface org.bukkit.entity.HumanEntity
    • openGrindstone

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openGrindstone(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openGrindstone in interface org.bukkit.entity.HumanEntity
    • openLoom

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openLoom(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openLoom in interface org.bukkit.entity.HumanEntity
    • openSmithingTable

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openSmithingTable(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openSmithingTable in interface org.bukkit.entity.HumanEntity
    • openStonecutter

      @Nullable public @Nullable org.bukkit.inventory.InventoryView openStonecutter(@Nullable @Nullable org.bukkit.Location location, boolean force)
      Specified by:
      openStonecutter in interface org.bukkit.entity.HumanEntity
    • getItemInHand

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getItemInHand()
      Specified by:
      getItemInHand in interface org.bukkit.entity.HumanEntity
    • setItemInHand

      public void setItemInHand(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Specified by:
      setItemInHand in interface org.bukkit.entity.HumanEntity
    • hasCooldown

      public boolean hasCooldown(@NotNull @NotNull org.bukkit.Material material)
      Specified by:
      hasCooldown in interface org.bukkit.entity.HumanEntity
    • getCooldown

      public int getCooldown(@NotNull @NotNull org.bukkit.Material material)
      Specified by:
      getCooldown in interface org.bukkit.entity.HumanEntity
    • setCooldown

      public void setCooldown(@NotNull @NotNull org.bukkit.Material material, int ticks)
      Specified by:
      setCooldown in interface org.bukkit.entity.HumanEntity
    • isDeeplySleeping

      public boolean isDeeplySleeping()
      Specified by:
      isDeeplySleeping in interface org.bukkit.entity.HumanEntity
    • isSleeping

      public boolean isSleeping()
      Specified by:
      isSleeping in interface org.bukkit.entity.LivingEntity
      Overrides:
      isSleeping in class LivingEntityMock
    • setSleeping

      public void setSleeping(boolean sleeping)
      Set whether this entity is slumbering.
      Parameters:
      sleeping - If this entity is slumbering
    • getSleepTicks

      public int getSleepTicks()
      Specified by:
      getSleepTicks in interface org.bukkit.entity.HumanEntity
    • getPotentialBedLocation

      @Nullable public @Nullable org.bukkit.Location getPotentialBedLocation()
      Specified by:
      getPotentialBedLocation in interface org.bukkit.entity.HumanEntity
    • getFishHook

      @Nullable public @Nullable org.bukkit.entity.FishHook getFishHook()
      Specified by:
      getFishHook in interface org.bukkit.entity.HumanEntity
    • sleep

      public boolean sleep(@NotNull @NotNull org.bukkit.Location location, boolean force)
      Specified by:
      sleep in interface org.bukkit.entity.HumanEntity
    • wakeup

      public void wakeup(boolean setSpawnLocation)
      Specified by:
      wakeup in interface org.bukkit.entity.HumanEntity
    • getBedLocation

      @NotNull public @NotNull org.bukkit.Location getBedLocation()
      Specified by:
      getBedLocation in interface org.bukkit.entity.HumanEntity
    • isBlocking

      public boolean isBlocking()
      Specified by:
      isBlocking in interface org.bukkit.entity.HumanEntity
    • setBlocking

      public void setBlocking(boolean blocking)
      Set whether this entity is blocking. If the entity is not holding a shield, this will be ignored.
      Parameters:
      blocking - If this entity is blocking
    • isHandRaised

      public boolean isHandRaised()
      Specified by:
      isHandRaised in interface org.bukkit.entity.HumanEntity
      Specified by:
      isHandRaised in interface org.bukkit.entity.LivingEntity
      Overrides:
      isHandRaised in class LivingEntityMock
    • getItemInUse

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getItemInUse()
      Specified by:
      getItemInUse in interface org.bukkit.entity.LivingEntity
      Overrides:
      getItemInUse in class LivingEntityMock
    • getExpToLevel

      public int getExpToLevel()
      Specified by:
      getExpToLevel in interface org.bukkit.entity.HumanEntity
    • releaseLeftShoulderEntity

      @Nullable public @Nullable org.bukkit.entity.Entity releaseLeftShoulderEntity()
      Specified by:
      releaseLeftShoulderEntity in interface org.bukkit.entity.HumanEntity
    • releaseRightShoulderEntity

      @Nullable public @Nullable org.bukkit.entity.Entity releaseRightShoulderEntity()
      Specified by:
      releaseRightShoulderEntity in interface org.bukkit.entity.HumanEntity
    • getAttackCooldown

      public float getAttackCooldown()
      Specified by:
      getAttackCooldown in interface org.bukkit.entity.HumanEntity
    • discoverRecipe

      public boolean discoverRecipe(@NotNull @NotNull org.bukkit.NamespacedKey recipe)
      Specified by:
      discoverRecipe in interface org.bukkit.entity.HumanEntity
    • discoverRecipes

      public int discoverRecipes(@NotNull @NotNull Collection<org.bukkit.NamespacedKey> recipes)
      Specified by:
      discoverRecipes in interface org.bukkit.entity.HumanEntity
    • undiscoverRecipe

      public boolean undiscoverRecipe(@NotNull @NotNull org.bukkit.NamespacedKey recipe)
      Specified by:
      undiscoverRecipe in interface org.bukkit.entity.HumanEntity
    • undiscoverRecipes

      public int undiscoverRecipes(@NotNull @NotNull Collection<org.bukkit.NamespacedKey> recipes)
      Specified by:
      undiscoverRecipes in interface org.bukkit.entity.HumanEntity
    • hasDiscoveredRecipe

      public boolean hasDiscoveredRecipe(@NotNull @NotNull org.bukkit.NamespacedKey recipe)
      Specified by:
      hasDiscoveredRecipe in interface org.bukkit.entity.HumanEntity
    • getDiscoveredRecipes

      @NotNull public @NotNull Set<org.bukkit.NamespacedKey> getDiscoveredRecipes()
      Specified by:
      getDiscoveredRecipes in interface org.bukkit.entity.HumanEntity
    • getShoulderEntityLeft

      public org.bukkit.entity.Entity getShoulderEntityLeft()
      Specified by:
      getShoulderEntityLeft in interface org.bukkit.entity.HumanEntity
    • setShoulderEntityLeft

      public void setShoulderEntityLeft(org.bukkit.entity.Entity entity)
      Specified by:
      setShoulderEntityLeft in interface org.bukkit.entity.HumanEntity
    • getShoulderEntityRight

      public org.bukkit.entity.Entity getShoulderEntityRight()
      Specified by:
      getShoulderEntityRight in interface org.bukkit.entity.HumanEntity
    • setShoulderEntityRight

      public void setShoulderEntityRight(org.bukkit.entity.Entity entity)
      Specified by:
      setShoulderEntityRight in interface org.bukkit.entity.HumanEntity
    • openSign

      public void openSign(@NotNull @NotNull org.bukkit.block.Sign sign)
      Specified by:
      openSign in interface org.bukkit.entity.HumanEntity
    • dropItem

      public boolean dropItem(boolean dropAll)
      Specified by:
      dropItem in interface org.bukkit.entity.HumanEntity
    • getExhaustion

      public float getExhaustion()
      Specified by:
      getExhaustion in interface org.bukkit.entity.HumanEntity
    • setExhaustion

      public void setExhaustion(float value)
      Specified by:
      setExhaustion in interface org.bukkit.entity.HumanEntity
    • getSaturation

      public float getSaturation()
      Specified by:
      getSaturation in interface org.bukkit.entity.HumanEntity
    • setSaturation

      public void setSaturation(float value)
      Specified by:
      setSaturation in interface org.bukkit.entity.HumanEntity
    • getFoodLevel

      public int getFoodLevel()
      Specified by:
      getFoodLevel in interface org.bukkit.entity.HumanEntity
    • setFoodLevel

      public void setFoodLevel(int foodLevel)
      Specified by:
      setFoodLevel in interface org.bukkit.entity.HumanEntity
    • getSaturatedRegenRate

      public int getSaturatedRegenRate()
      Specified by:
      getSaturatedRegenRate in interface org.bukkit.entity.HumanEntity
    • setSaturatedRegenRate

      public void setSaturatedRegenRate(int ticks)
      Specified by:
      setSaturatedRegenRate in interface org.bukkit.entity.HumanEntity
    • getUnsaturatedRegenRate

      public int getUnsaturatedRegenRate()
      Specified by:
      getUnsaturatedRegenRate in interface org.bukkit.entity.HumanEntity
    • setUnsaturatedRegenRate

      public void setUnsaturatedRegenRate(int ticks)
      Specified by:
      setUnsaturatedRegenRate in interface org.bukkit.entity.HumanEntity
    • getStarvationRate

      public int getStarvationRate()
      Specified by:
      getStarvationRate in interface org.bukkit.entity.HumanEntity
    • setStarvationRate

      public void setStarvationRate(int ticks)
      Specified by:
      setStarvationRate in interface org.bukkit.entity.HumanEntity