Class InventoryViewMock

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

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

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

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

    Fields inherited from interface 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
    void
     
    int
    convertSlot(int rawSlot)
     
    int
     
    @NotNull org.bukkit.inventory.Inventory
     
    @NotNull org.bukkit.inventory.ItemStack
     
    @Nullable org.bukkit.inventory.Inventory
    getInventory(int rawSlot)
     
    @Nullable org.bukkit.inventory.ItemStack
    getItem(int slot)
     
    @NotNull String
     
    @NotNull org.bukkit.entity.HumanEntity
     
    org.bukkit.event.inventory.InventoryType.SlotType
    getSlotType(int slot)
     
    @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
    setCursor(@Nullable org.bukkit.inventory.ItemStack item)
     
    void
    setItem(int slot, @Nullable org.bukkit.inventory.ItemStack item)
     
    void
    setPlayer(org.bukkit.entity.HumanEntity player)
    Sets the player viewing.
    boolean
    setProperty(org.bukkit.inventory.InventoryView.Property prop, int value)
     
    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 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bukkit.inventory.InventoryView

    title
  • 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 interface org.bukkit.inventory.InventoryView
    • getBottomInventory

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

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

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

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

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

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

      public void setCursor(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Specified by:
      setCursor in interface org.bukkit.inventory.InventoryView
    • getCursor

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getCursor()
      Specified by:
      getCursor in interface org.bukkit.inventory.InventoryView
    • setItem

      public void setItem(int slot, @Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Specified by:
      setItem in interface org.bukkit.inventory.InventoryView
    • getItem

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getItem(int slot)
      Specified by:
      getItem in interface org.bukkit.inventory.InventoryView
    • getInventory

      @Nullable public @Nullable org.bukkit.inventory.Inventory getInventory(int rawSlot)
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryView
    • convertSlot

      public int convertSlot(int rawSlot)
      Specified by:
      convertSlot in interface org.bukkit.inventory.InventoryView
    • getSlotType

      @NotNull public org.bukkit.event.inventory.InventoryType.SlotType getSlotType(int slot)
      Specified by:
      getSlotType in interface org.bukkit.inventory.InventoryView
    • close

      public void close()
      Specified by:
      close in interface org.bukkit.inventory.InventoryView
    • countSlots

      public int countSlots()
      Specified by:
      countSlots in interface org.bukkit.inventory.InventoryView
    • setProperty

      public boolean setProperty(@NotNull org.bukkit.inventory.InventoryView.Property prop, int value)
      Specified by:
      setProperty in interface org.bukkit.inventory.InventoryView