Package me.hsgamer.hscore.minecraft.gui
Class InventoryGUIDisplay<H extends GUIHolder<?>>
java.lang.Object
me.hsgamer.hscore.ui.BaseDisplay<H>
me.hsgamer.hscore.minecraft.gui.GUIDisplay<H>
me.hsgamer.hscore.minecraft.gui.InventoryGUIDisplay<H>
- Type Parameters:
H
- the type of the holder
- All Implemented Interfaces:
Display
,Initializable
,Updatable
- Direct Known Subclasses:
BukkitGUIDisplay
,MinestomGUIDisplay
An implementation of
GUIDisplay
for Inventory-based GUI-
Field Summary
Fields inherited from class me.hsgamer.hscore.ui.BaseDisplay
holder, uuid
-
Constructor Summary
ModifierConstructorDescriptionprotected
InventoryGUIDisplay
(@NotNull UUID uuid, H holder) Create a new display -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Clear the inventoryprotected abstract InventorySize
Get the size of the inventorygetViewedButton
(int slot) Get the viewed button at the slotGet the viewed buttonsvoid
handleEvent
(ViewerEvent event) Handle the eventvoid
init()
Initialize some properties for the objectprotected abstract void
Initialize the inventoryprotected abstract void
Get the title of the inventoryvoid
stop()
Stop the objectvoid
update()
Update the updatable objectMethods inherited from class me.hsgamer.hscore.minecraft.gui.GUIDisplay
open
Methods inherited from class me.hsgamer.hscore.ui.BaseDisplay
getHolder, getUniqueId
-
Constructor Details
-
InventoryGUIDisplay
Create a new display- Parameters:
uuid
- the unique idholder
- the holder
-
-
Method Details
-
initInventory
protected abstract void initInventory()Initialize the inventory -
clearInventory
protected abstract void clearInventory()Clear the inventory -
getInventorySize
Get the size of the inventory- Returns:
- the size
-
setButton
Get the title of the inventory- Parameters:
slot
- the slotitem
- the item
-
handleEvent
Description copied from class:GUIDisplay
Handle the event- Specified by:
handleEvent
in classGUIDisplay<H extends GUIHolder<?>>
- Parameters:
event
- the event
-
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object -
stop
public void stop()Description copied from interface:Initializable
Stop the object -
update
public void update()Description copied from interface:Updatable
Update the updatable object -
getViewedButton
Get the viewed button at the slot- Parameters:
slot
- the slot- Returns:
- the viewed button
-
getViewedButtons
Get the viewed buttons- Returns:
- the viewed buttons
-