Class InventoryViewMock

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

public abstract class InventoryViewMock extends org.bukkit.inventory.InventoryView
Mock implementation of an InventoryView.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.inventory.InventoryView

    org.bukkit.inventory.InventoryView.Property
  • Field Summary

    Fields inherited from class org.bukkit.inventory.InventoryView

    OUTSIDE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    InventoryViewMock(org.bukkit.entity.HumanEntity player, String name, org.bukkit.inventory.Inventory top, org.bukkit.inventory.Inventory bottom, org.bukkit.event.inventory.InventoryType type)
    Constructs a new InventoryViewMock with the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.inventory.Inventory
     
    @NotNull String
     
    @NotNull org.bukkit.entity.HumanEntity
     
    @NotNull String
     
    @NotNull org.bukkit.inventory.Inventory
     
    @NotNull org.bukkit.event.inventory.InventoryType
     
    void
    setBottomInventory(org.bukkit.inventory.Inventory inventory)
    Sets the bottom inventory.
    void
    setPlayer(org.bukkit.entity.HumanEntity player)
    Sets the player viewing.
    void
    setTitle(@NotNull String title)
     
    void
    setTopInventory(org.bukkit.inventory.Inventory inventory)
    Sets the top inventory.
    void
    setType(org.bukkit.event.inventory.InventoryType type)
    Sets the type of inventory view.

    Methods inherited from class org.bukkit.inventory.InventoryView

    close, convertSlot, countSlots, getCursor, getInventory, getItem, getSlotType, setCursor, setItem, setProperty, title

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InventoryViewMock

      protected InventoryViewMock(org.bukkit.entity.HumanEntity player, String name, org.bukkit.inventory.Inventory top, org.bukkit.inventory.Inventory bottom, org.bukkit.event.inventory.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(org.bukkit.inventory.Inventory inventory)
      Sets the top inventory.
      Parameters:
      inventory - The top inventory.
    • setBottomInventory

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

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

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

      @NotNull public @NotNull org.bukkit.inventory.Inventory getTopInventory()
      Specified by:
      getTopInventory in class org.bukkit.inventory.InventoryView
    • getBottomInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getBottomInventory()
      Specified by:
      getBottomInventory in class org.bukkit.inventory.InventoryView
    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.HumanEntity getPlayer()
      Specified by:
      getPlayer in class org.bukkit.inventory.InventoryView
    • getType

      @NotNull public @NotNull org.bukkit.event.inventory.InventoryType getType()
      Specified by:
      getType in class org.bukkit.inventory.InventoryView
    • getTitle

      @NotNull public @NotNull String getTitle()
      Specified by:
      getTitle in class org.bukkit.inventory.InventoryView
    • getOriginalTitle

      @NotNull public @NotNull String getOriginalTitle()
      Specified by:
      getOriginalTitle in class org.bukkit.inventory.InventoryView
    • setTitle

      public void setTitle(@NotNull @NotNull String title)
      Specified by:
      setTitle in class org.bukkit.inventory.InventoryView