Class OneTimeAnimatedMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.MultiMask<Map<Integer,ActionItem>>
me.hsgamer.hscore.minecraft.gui.mask.OneTimeAnimatedMask
- All Implemented Interfaces:
Function<@NotNull InventoryContext,
,@Nullable Map<Integer, ActionItem>> GUIElement
The animated mask with child masks as frames, but only run once
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map
<Integer, ActionItem> apply
(@NotNull InventoryContext context) protected boolean
Whether this mask requires child elementsvoid
Reset the animation for the unique idvoid
setPeriodMillis
(long periodMillis) Set the period of the animationvoid
setViewLast
(boolean viewLast) Set whether to view the last frame when the animation is finishedvoid
stop()
Stop the element.Methods inherited from class me.hsgamer.hscore.minecraft.gui.mask.MultiMask
add, add, getElements, init
-
Constructor Details
-
OneTimeAnimatedMask
public OneTimeAnimatedMask()
-
-
Method Details
-
requireChildElements
protected boolean requireChildElements()Description copied from class:MultiMask
Whether this mask requires child elements- Overrides:
requireChildElements
in 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
-
setViewLast
public void setViewLast(boolean viewLast) Set whether to view the last frame when the animation is finished- Parameters:
viewLast
- true to view the last frame
-
reset
Reset the animation for the unique id- Parameters:
uuid
- the unique id
-
stop
public void stop()Description copied from interface:GUIElement
Stop the element. Should be called after removing from the GUI.- Specified by:
stop
in interfaceGUIElement
- Overrides:
stop
in classMultiMask<Map<Integer,
ActionItem>>
-
apply
@Nullable public @Nullable Map<Integer,ActionItem> apply(@NotNull @NotNull InventoryContext context)
-