Class InventoryViewMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.InventoryViewMock
- All Implemented Interfaces:
InventoryView
- Direct Known Subclasses:
PlayerInventoryViewMock,SimpleInventoryViewMock
Mock implementation of an
InventoryView.-
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
ConstructorsModifierConstructorDescriptionprotectedInventoryViewMock(HumanEntity player, String name, Inventory top, Inventory bottom, InventoryType type) Constructs a newInventoryViewMockwith the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intconvertSlot(int rawSlot) int@NotNull Inventory@NotNull ItemStack@Nullable InventorygetInventory(int rawSlot) @Nullable ItemStackgetItem(int slot) @NotNull String@NotNull HumanEntitygetSlotType(int slot) @NotNull StringgetTitle()@NotNull Inventory@NotNull InventoryTypegetType()voidsetBottomInventory(Inventory inventory) Sets the bottom inventory.voidvoidvoidsetPlayer(HumanEntity player) Sets the player viewing.booleansetProperty(InventoryView.Property prop, int value) voidvoidsetTopInventory(Inventory inventory) Sets the top inventory.voidsetType(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, waitMethods inherited from interface org.bukkit.inventory.InventoryView
title
-
Constructor Details
-
InventoryViewMock
protected InventoryViewMock(HumanEntity player, String name, Inventory top, Inventory bottom, InventoryType type) Constructs a newInventoryViewMockwith 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:
getTopInventoryin interfaceInventoryView
-
getBottomInventory
- Specified by:
getBottomInventoryin interfaceInventoryView
-
getPlayer
- Specified by:
getPlayerin interfaceInventoryView
-
getType
- Specified by:
getTypein interfaceInventoryView
-
getTitle
- Specified by:
getTitlein interfaceInventoryView
-
getOriginalTitle
- Specified by:
getOriginalTitlein interfaceInventoryView
-
setTitle
- Specified by:
setTitlein interfaceInventoryView
-
setCursor
- Specified by:
setCursorin interfaceInventoryView
-
getCursor
- Specified by:
getCursorin interfaceInventoryView
-
setItem
- Specified by:
setItemin interfaceInventoryView
-
getItem
- Specified by:
getItemin interfaceInventoryView
-
getInventory
- Specified by:
getInventoryin interfaceInventoryView
-
convertSlot
public int convertSlot(int rawSlot) - Specified by:
convertSlotin interfaceInventoryView
-
getSlotType
- Specified by:
getSlotTypein interfaceInventoryView
-
close
public void close()- Specified by:
closein interfaceInventoryView
-
countSlots
public int countSlots()- Specified by:
countSlotsin interfaceInventoryView
-
setProperty
- Specified by:
setPropertyin interfaceInventoryView
-