Package me.hsgamer.hscore.minestom.gui
Class MinestomInventoryContext
java.lang.Object
me.hsgamer.hscore.minestom.gui.MinestomInventoryContext
- All Implemented Interfaces:
InventoryContext
The
InventoryContext of Inventory-
Constructor Summary
ConstructorsConstructorDescriptionMinestomInventoryContext(UUID viewerId, net.minestom.server.inventory.Inventory inventory) Create a new instance -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.minecraft.gui.common.inventory.InventoryContext
getSlot
-
Constructor Details
-
MinestomInventoryContext
Create a new instance- Parameters:
viewerId- the viewer idinventory- the inventory
-
-
Method Details
-
getInventory
public net.minestom.server.inventory.Inventory getInventory()Get the Minestom inventory- Returns:
- the Minestom inventory
-
getViewerID
Description copied from interface:InventoryContextGet the unique ID of the viewer- Specified by:
getViewerIDin interfaceInventoryContext- Returns:
- the unique ID of the viewer
-
getSize
public int getSize()Description copied from interface:InventoryContextGet the size of the inventory- Specified by:
getSizein interfaceInventoryContext- Returns:
- the size of the inventory
-
getSlot
public int getSlot(int x, int y) Description copied from interface:InventoryContextGet the inventory slot from x and y coordinate- Specified by:
getSlotin interfaceInventoryContext- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- the slot
-