Class SingleMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.SingleMask
- All Implemented Interfaces:
Function<@NotNull InventoryContext,,@Nullable Map<Integer, ActionItem>> GUIElement
public class SingleMask
extends Object
implements GUIElement, Function<@NotNull InventoryContext,@Nullable Map<Integer,ActionItem>>
The simple mask with a single button
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Function<@NotNull InventoryContext, @Nullable ActionItem> protected final int -
Constructor Summary
ConstructorsConstructorDescriptionSingleMask(int slot, @NotNull Function<@NotNull InventoryContext, @Nullable ActionItem> button) Create a new mask -
Method Summary
Modifier and TypeMethodDescription@Nullable Map<Integer, ActionItem> apply(@NotNull InventoryContext context) voidinit()Initialize the element.voidstop()Stop the element.
-
Field Details
-
slot
protected final int slot -
button
-
-
Constructor Details
-
SingleMask
public SingleMask(int slot, @NotNull @NotNull Function<@NotNull InventoryContext, @Nullable ActionItem> button) Create a new mask- Parameters:
slot- the slotbutton- the button
-
-
Method Details
-
init
public void init()Description copied from interface:GUIElementInitialize the element. Should be called before adding to the GUI.- Specified by:
initin interfaceGUIElement
-
stop
public void stop()Description copied from interface:GUIElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceGUIElement
-
apply
@Nullable public @Nullable Map<Integer,ActionItem> apply(@NotNull @NotNull InventoryContext context) - Specified by:
applyin interfaceFunction<@NotNull InventoryContext,@Nullable Map<Integer, ActionItem>>
-