Class ItemEntityMock

All Implemented Interfaces:
MessageTarget, 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>, CommandSender, Entity, Item, Metadatable, Nameable, Permissible, ServerOperator, PersistentDataHolder

public class ItemEntityMock extends EntityMock implements Item
Mock implementation of an Item.
See Also:
  • Constructor Details

    • ItemEntityMock

      public ItemEntityMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid, @NotNull @NotNull ItemStack item)
      Constructs a new ItemEntityMock on the provided ServerMock with a specified UUID and ItemStack.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
      item - The item this entity represents.
  • Method Details

    • getType

      @NotNull public @NotNull EntityType getType()
      Specified by:
      getType in interface Entity
      Overrides:
      getType in class EntityMock
    • getItemStack

      @NotNull public @NotNull ItemStack getItemStack()
      Specified by:
      getItemStack in interface Item
    • setItemStack

      public void setItemStack(@NotNull @NotNull ItemStack stack)
      Specified by:
      setItemStack in interface Item
    • getPickupDelay

      public int getPickupDelay()
      Specified by:
      getPickupDelay in interface Item
    • setPickupDelay

      public void setPickupDelay(int delay)
      Specified by:
      setPickupDelay in interface Item
    • setUnlimitedLifetime

      public void setUnlimitedLifetime(boolean unlimited)
      Specified by:
      setUnlimitedLifetime in interface Item
    • isUnlimitedLifetime

      public boolean isUnlimitedLifetime()
      Specified by:
      isUnlimitedLifetime in interface Item
    • setOwner

      public void setOwner(@Nullable @Nullable UUID owner)
      Specified by:
      setOwner in interface Item
    • getOwner

      @Nullable public @Nullable UUID getOwner()
      Specified by:
      getOwner in interface Item
    • setThrower

      public void setThrower(@Nullable @Nullable UUID thrower)
      Specified by:
      setThrower in interface Item
    • getThrower

      @Nullable public @Nullable UUID getThrower()
      Specified by:
      getThrower in interface Item
    • canMobPickup

      public boolean canMobPickup()
      Specified by:
      canMobPickup in interface Item
    • setCanMobPickup

      public void setCanMobPickup(boolean canMobPickup)
      Specified by:
      setCanMobPickup in interface Item
    • canPlayerPickup

      public boolean canPlayerPickup()
      Specified by:
      canPlayerPickup in interface Item
    • setCanPlayerPickup

      public void setCanPlayerPickup(boolean canPlayerPickup)
      Specified by:
      setCanPlayerPickup in interface Item
    • willAge

      public boolean willAge()
      Specified by:
      willAge in interface Item
    • setWillAge

      public void setWillAge(boolean willAge)
      Specified by:
      setWillAge in interface Item
    • getHealth

      public int getHealth()
      Specified by:
      getHealth in interface Item
    • setHealth

      public void setHealth(int health)
      Specified by:
      setHealth in interface Item
    • getFrictionState

      @NotNull public @NotNull net.kyori.adventure.util.TriState getFrictionState()
      Specified by:
      getFrictionState in interface Frictional
    • setFrictionState

      public void setFrictionState(@NotNull @NotNull net.kyori.adventure.util.TriState state)
      Specified by:
      setFrictionState in interface Frictional