Class SimpleInventoryViewMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.InventoryViewMock
be.seeseemelk.mockbukkit.inventory.SimpleInventoryViewMock
- All Implemented Interfaces:
InventoryView
A basic inventory view.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.inventory.InventoryView
InventoryView.Property -
Field Summary
Fields inherited from interface org.bukkit.inventory.InventoryView
OUTSIDE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a very simple mockIntventoryViewwith as player, top, and bottomnull, and as typeInventoryType.CHEST.SimpleInventoryViewMock(HumanEntity player, Inventory top, Inventory bottom, InventoryType type) Constructs a newSimpleInventoryViewMockwith the provided parameters, and "Inventory" as the name. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intconvertSlot(int rawSlot) int@NotNull ItemStack@Nullable InventorygetInventory(int rawSlot) @Nullable ItemStackgetItem(int slot) getSlotType(int slot) voidvoidbooleansetProperty(InventoryView.Property prop, int value) Methods inherited from class be.seeseemelk.mockbukkit.inventory.InventoryViewMock
getBottomInventory, getOriginalTitle, getPlayer, getTitle, getTopInventory, getType, setBottomInventory, setPlayer, setTitle, setTopInventory, setTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.inventory.InventoryView
title
-
Constructor Details
-
SimpleInventoryViewMock
public SimpleInventoryViewMock(HumanEntity player, Inventory top, Inventory bottom, InventoryType type) Constructs a newSimpleInventoryViewMockwith the provided parameters, and "Inventory" as the name.- Parameters:
player- The player this view is for.top- The top inventory.bottom- The bottom inventory.type- The type of the inventory.
-
SimpleInventoryViewMock
public SimpleInventoryViewMock()Creates a very simple mockIntventoryViewwith as player, top, and bottomnull, and as typeInventoryType.CHEST.
-
-
Method Details
-
setItem
- Specified by:
setItemin interfaceInventoryView- Overrides:
setItemin classInventoryViewMock
-
getItem
- Specified by:
getItemin interfaceInventoryView- Overrides:
getItemin classInventoryViewMock
-
setCursor
- Specified by:
setCursorin interfaceInventoryView- Overrides:
setCursorin classInventoryViewMock
-
getCursor
- Specified by:
getCursorin interfaceInventoryView- Overrides:
getCursorin classInventoryViewMock
-
getInventory
- Specified by:
getInventoryin interfaceInventoryView- Overrides:
getInventoryin classInventoryViewMock
-
convertSlot
public int convertSlot(int rawSlot) - Specified by:
convertSlotin interfaceInventoryView- Overrides:
convertSlotin classInventoryViewMock
-
getSlotType
- Specified by:
getSlotTypein interfaceInventoryView- Overrides:
getSlotTypein classInventoryViewMock
-
close
public void close()- Specified by:
closein interfaceInventoryView- Overrides:
closein classInventoryViewMock
-
countSlots
public int countSlots()- Specified by:
countSlotsin interfaceInventoryView- Overrides:
countSlotsin classInventoryViewMock
-
setProperty
- Specified by:
setPropertyin interfaceInventoryView- Overrides:
setPropertyin classInventoryViewMock
-