Class AnimatedMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.AnimatedMask
- All Implemented Interfaces:
Mask
,Initializable
The animated mask with child masks as frames
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Mask>
AnimatedMaskaddMask
(@NotNull Collection<@NotNull T> masks) Add mask(s)Add mask(s)generateButtons
(@NotNull UUID uuid, @NotNull InventorySize inventorySize) Generate the buttons for the unique idgetMasks()
Get the list of masksvoid
init()
Initialize some properties for the objectsetPeriodMillis
(long periodMillis) Set the period of the animationsetPeriodTicks
(long periodTicks) Set the period of the animationvoid
stop()
Stop the object
-
Constructor Details
-
AnimatedMask
Create a new mask- Parameters:
name
- the name of the mask
-
-
Method Details
-
addMask
@Contract("_ -> this") public <T extends Mask> AnimatedMask addMask(@NotNull @NotNull Collection<@NotNull T> masks) Add mask(s)- Type Parameters:
T
- the type of the mask- Parameters:
masks
- the mask (or frame)- Returns:
- this instance
-
addMask
Add mask(s)- Parameters:
mask
- the mask (or frame)- Returns:
- this instance
-
setPeriodMillis
Set the period of the animation- Parameters:
periodMillis
- the period in milliseconds- Returns:
- this instance
-
setPeriodTicks
Set the period of the animation- Parameters:
periodTicks
- the period in ticks- Returns:
- this instance
-
getMasks
Get the list of masks- Returns:
- the masks
-
generateButtons
public Optional<Map<Integer,Button>> generateButtons(@NotNull @NotNull UUID uuid, @NotNull @NotNull InventorySize inventorySize) Description copied from interface:Mask
Generate the buttons for the unique id- Parameters:
uuid
- the unique idinventorySize
- the size of the inventory- Returns:
- the map contains the slots and the buttons
-
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
-