Class ChestMock

All Implemented Interfaces:
com.destroystokyo.paper.loottable.LootableBlockInventory, com.destroystokyo.paper.loottable.LootableInventory, org.bukkit.block.BlockState, org.bukkit.block.Chest, org.bukkit.block.Container, org.bukkit.block.Lidded, org.bukkit.block.Lockable, org.bukkit.block.TileState, org.bukkit.inventory.BlockInventoryHolder, org.bukkit.inventory.InventoryHolder, org.bukkit.loot.Lootable, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.persistence.PersistentDataHolder

public class ChestMock extends ContainerMock implements org.bukkit.block.Chest
This ContainerMock represents a Chest or Trapped Chest.
  • Constructor Details

    • ChestMock

      public ChestMock(@NotNull @NotNull org.bukkit.Material material)
    • ChestMock

      protected ChestMock(@NotNull @NotNull org.bukkit.block.Block block)
    • ChestMock

      protected ChestMock(@NotNull @NotNull ChestMock state)
  • Method Details

    • setLootTable

      public void setLootTable(org.bukkit.loot.LootTable table)
      Specified by:
      setLootTable in interface org.bukkit.loot.Lootable
    • getLootTable

      public org.bukkit.loot.LootTable getLootTable()
      Specified by:
      getLootTable in interface org.bukkit.loot.Lootable
    • setSeed

      public void setSeed(long seed)
      Specified by:
      setSeed in interface org.bukkit.loot.Lootable
    • getSeed

      public long getSeed()
      Specified by:
      getSeed in interface org.bukkit.loot.Lootable
    • open

      public void open()
      Specified by:
      open in interface org.bukkit.block.Lidded
    • close

      public void close()
      Specified by:
      close in interface org.bukkit.block.Lidded
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.bukkit.block.Lidded
    • getBlockInventory

      public org.bukkit.inventory.Inventory getBlockInventory()
      Specified by:
      getBlockInventory in interface org.bukkit.block.Chest
    • createInventory

      protected InventoryMock createInventory()
      Specified by:
      createInventory in class ContainerMock
    • getSnapshot

      @NotNull public @NotNull org.bukkit.block.BlockState getSnapshot()
      Description copied from class: BlockStateMock
      This returns a copy of this BlockStateMock. Inheritents of this class should override this method!
      Specified by:
      getSnapshot in class ContainerMock
      Returns:
      A snapshot of this BlockStateMock.
    • isRefillEnabled

      public boolean isRefillEnabled()
      Specified by:
      isRefillEnabled in interface com.destroystokyo.paper.loottable.LootableInventory
    • hasBeenFilled

      public boolean hasBeenFilled()
      Specified by:
      hasBeenFilled in interface com.destroystokyo.paper.loottable.LootableInventory
    • hasPlayerLooted

      public boolean hasPlayerLooted(@NotNull @NotNull UUID player)
      Specified by:
      hasPlayerLooted in interface com.destroystokyo.paper.loottable.LootableInventory
    • getLastLooted

      @Nullable public @Nullable Long getLastLooted(@NotNull @NotNull UUID player)
      Specified by:
      getLastLooted in interface com.destroystokyo.paper.loottable.LootableInventory
    • setHasPlayerLooted

      public boolean setHasPlayerLooted(@NotNull @NotNull UUID player, boolean looted)
      Specified by:
      setHasPlayerLooted in interface com.destroystokyo.paper.loottable.LootableInventory
    • hasPendingRefill

      public boolean hasPendingRefill()
      Specified by:
      hasPendingRefill in interface com.destroystokyo.paper.loottable.LootableInventory
    • getLastFilled

      public long getLastFilled()
      Specified by:
      getLastFilled in interface com.destroystokyo.paper.loottable.LootableInventory
    • getNextRefill

      public long getNextRefill()
      Specified by:
      getNextRefill in interface com.destroystokyo.paper.loottable.LootableInventory
    • setNextRefill

      public long setNextRefill(long refillAt)
      Specified by:
      setNextRefill in interface com.destroystokyo.paper.loottable.LootableInventory