Class SimpleButtonMap
java.lang.Object
me.hsgamer.hscore.minecraft.gui.simple.SimpleButtonMap
- All Implemented Interfaces:
ButtonMap
,Initializable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<Button>
getButtons
(int slot) Get buttons by the slot@NotNull Map<@NotNull Integer,
@NotNull DisplayButton> getButtons
(@NotNull UUID uuid, InventorySize inventorySize) Get the button map that is ready to be displayed to the unique idGet the map of buttons@NotNull Button
Get the default button@NotNull Collection<Button>
Remove all buttonsvoid
removeButton
(int slot) Remove the buttonvoid
Set the buttonvoid
setDefaultButton
(@NotNull Button defaultButton) Set the default buttonvoid
stop()
Stop the objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.hsgamer.hscore.ui.property.Initializable
init
-
Constructor Details
-
SimpleButtonMap
public SimpleButtonMap()
-
-
Method Details
-
setButton
Set the button- Parameters:
slot
- the slotbutton
- the button
-
removeButton
public void removeButton(int slot) Remove the button- Parameters:
slot
- the slot
-
removeAllButton
Remove all buttons- Returns:
- all cleared buttons
-
getButtons
Get buttons by the slot- Parameters:
slot
- the slot- Returns:
- the button
-
getButtonSlotMap
Get the map of buttons- Returns:
- the map of buttons
-
getDefaultButton
Get the default button- Returns:
- the button
-
setDefaultButton
Set the default button- Parameters:
defaultButton
- the button
-
stop
public void stop()Description copied from interface:Initializable
Stop the object- Specified by:
stop
in interfaceInitializable
-
getButtons
@NotNull public @NotNull Map<@NotNull Integer,@NotNull DisplayButton> getButtons(@NotNull @NotNull UUID uuid, InventorySize inventorySize) Description copied from interface:ButtonMap
Get the button map that is ready to be displayed to the unique id- Specified by:
getButtons
in interfaceButtonMap
- Parameters:
uuid
- the unique idinventorySize
- the size of the inventory- Returns:
- the button map
-