Class InventoryViewMock
java.lang.Object
org.bukkit.inventory.InventoryView
be.seeseemelk.mockbukkit.inventory.InventoryViewMock
- Direct Known Subclasses:
PlayerInventoryViewMock
,SimpleInventoryViewMock
Mock implementation of an
InventoryView
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.inventory.InventoryView
InventoryView.Property
-
Field Summary
Fields inherited from class org.bukkit.inventory.InventoryView
OUTSIDE
-
Constructor Summary
ModifierConstructorDescriptionprotected
InventoryViewMock
(HumanEntity player, String name, Inventory top, Inventory bottom, InventoryType type) Constructs a newInventoryViewMock
with the provided parameters. -
Method Summary
Modifier and TypeMethodDescription@NotNull Inventory
@NotNull String
@NotNull HumanEntity
@NotNull String
getTitle()
@NotNull Inventory
@NotNull InventoryType
getType()
void
setBottomInventory
(Inventory inventory) Sets the bottom inventory.void
setPlayer
(HumanEntity player) Sets the player viewing.void
void
setTopInventory
(Inventory inventory) Sets the top inventory.void
setType
(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
-
Constructor Details
-
InventoryViewMock
protected InventoryViewMock(HumanEntity player, String name, Inventory top, Inventory bottom, InventoryType type) Constructs a newInventoryViewMock
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
Sets the top inventory.- Parameters:
inventory
- The top inventory.
-
setBottomInventory
Sets the bottom inventory.- Parameters:
inventory
- The bottom inventory.
-
setPlayer
Sets the player viewing.- Parameters:
player
- The player viewing.
-
setType
Sets the type of inventory view.- Parameters:
type
- The new type of inventory view.
-
getTopInventory
- Specified by:
getTopInventory
in classInventoryView
-
getBottomInventory
- Specified by:
getBottomInventory
in classInventoryView
-
getPlayer
- Specified by:
getPlayer
in classInventoryView
-
getType
- Specified by:
getType
in classInventoryView
-
getTitle
- Specified by:
getTitle
in classInventoryView
-
getOriginalTitle
- Specified by:
getOriginalTitle
in classInventoryView
-
setTitle
- Specified by:
setTitle
in classInventoryView
-