Class AnimatedMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.AnimatedMask
- All Implemented Interfaces:
Mask,me.hsgamer.hscore.ui.property.IdentifiedUpdatable,me.hsgamer.hscore.ui.property.Initializable
public class AnimatedMask
extends BaseMask
implements me.hsgamer.hscore.ui.property.IdentifiedUpdatable
The animated mask with child masks as frames
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Mask>
AnimatedMaskaddMask(@NotNull Collection<@NotNull T> masks) Add mask(s)Add mask(s)booleanCheck if the target can view the maskgenerateButtons(@NotNull UUID uuid, int size) Generate the buttons for the unique idgetMasks()Get the list of masksvoidinit()setPeriodMillis(long periodMillis) Set the period of the animationsetPeriodTicks(long periodTicks) Set the period of the animationvoidstop()void
-
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
Description copied from interface:MaskGenerate the buttons for the unique id- Specified by:
generateButtonsin interfaceMask- Parameters:
uuid- the unique idsize- the size of the inventory- Returns:
- the map contains the slots and the buttons
-
canView
Description copied from interface:MaskCheck if the target can view the mask -
init
public void init()- Specified by:
initin interfaceme.hsgamer.hscore.ui.property.Initializable
-
stop
public void stop()- Specified by:
stopin interfaceme.hsgamer.hscore.ui.property.Initializable
-
update
- Specified by:
updatein interfaceme.hsgamer.hscore.ui.property.IdentifiedUpdatable
-