Class InventoryViewMock

java.lang.Object
org.bukkit.inventory.InventoryView
be.seeseemelk.mockbukkit.inventory.InventoryViewMock
Direct Known Subclasses:
PlayerInventoryViewMock, SimpleInventoryViewMock

public abstract class InventoryViewMock extends InventoryView
Mock implementation of an InventoryView.
  • Constructor Details

    • InventoryViewMock

      protected InventoryViewMock(HumanEntity player, String name, Inventory top, Inventory bottom, InventoryType type)
      Constructs a new InventoryViewMock with the provided parameters.
      Parameters:
      player - The player this view is for.
      name - The name of the view (title).
      top - The top inventory.
      bottom - The bottom inventory.
      type - The type of the inventory.
  • Method Details

    • setTopInventory

      public void setTopInventory(Inventory inventory)
      Sets the top inventory.
      Parameters:
      inventory - The top inventory.
    • setBottomInventory

      public void setBottomInventory(Inventory inventory)
      Sets the bottom inventory.
      Parameters:
      inventory - The bottom inventory.
    • setPlayer

      public void setPlayer(HumanEntity player)
      Sets the player viewing.
      Parameters:
      player - The player viewing.
    • setType

      public void setType(InventoryType type)
      Sets the type of inventory view.
      Parameters:
      type - The new type of inventory view.
    • getTopInventory

      @NotNull public @NotNull Inventory getTopInventory()
      Specified by:
      getTopInventory in class InventoryView
    • getBottomInventory

      @NotNull public @NotNull Inventory getBottomInventory()
      Specified by:
      getBottomInventory in class InventoryView
    • getPlayer

      @NotNull public @NotNull HumanEntity getPlayer()
      Specified by:
      getPlayer in class InventoryView
    • getType

      @NotNull public @NotNull InventoryType getType()
      Specified by:
      getType in class InventoryView
    • getTitle

      @NotNull public @NotNull String getTitle()
      Specified by:
      getTitle in class InventoryView