Class AnimatedMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.MultiMask<Map<Integer,ActionItem>>
me.hsgamer.hscore.minecraft.gui.mask.AnimatedMask
- All Implemented Interfaces:
Function<@NotNull InventoryContext,,@Nullable Map<Integer, ActionItem>> GUIElement
The animated mask with child masks as frames
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map<Integer, ActionItem> apply(@NotNull InventoryContext context) protected booleanWhether this mask requires child elementsvoidsetPeriodMillis(long periodMillis) Set the period of the animationvoidstop()Stop the element.Methods inherited from class me.hsgamer.hscore.minecraft.gui.mask.MultiMask
add, add, getElements, init
-
Constructor Details
-
AnimatedMask
public AnimatedMask()
-
-
Method Details
-
requireChildElements
protected boolean requireChildElements()Description copied from class:MultiMaskWhether this mask requires child elements- Overrides:
requireChildElementsin classMultiMask<Map<Integer,ActionItem>> - Returns:
- true if it requires child elements
-
setPeriodMillis
public void setPeriodMillis(long periodMillis) Set the period of the animation- Parameters:
periodMillis- the period in milliseconds
-
stop
public void stop()Description copied from interface:GUIElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceGUIElement- Overrides:
stopin classMultiMask<Map<Integer,ActionItem>>
-
apply
@Nullable public @Nullable Map<Integer,ActionItem> apply(@NotNull @NotNull InventoryContext context)
-