Class AnimatedButton

java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.AnimatedButton
All Implemented Interfaces:
Button, me.hsgamer.hscore.ui.property.IdentifiedUpdatable, me.hsgamer.hscore.ui.property.Initializable

public class AnimatedButton extends Object implements Button, me.hsgamer.hscore.ui.property.IdentifiedUpdatable
The animated button with child buttons as frames
  • Constructor Details

    • AnimatedButton

      public AnimatedButton()
  • Method Details

    • setPeriodMillis

      @Contract("_ -> this") public AnimatedButton setPeriodMillis(long periodMillis)
      Set the period of the animation
      Parameters:
      periodMillis - the period in milliseconds
      Returns:
      this instance
    • setPeriodTicks

      @Contract("_ -> this") public AnimatedButton setPeriodTicks(long periodTicks)
      Set the period of the animation
      Parameters:
      periodTicks - the period in ticks
      Returns:
      this instance
    • addButton

      @Contract("_ -> this") public <T extends Button> AnimatedButton addButton(@NotNull @NotNull Collection<@NotNull T> buttons)
      Add button(s)
      Type Parameters:
      T - the type of the button
      Parameters:
      buttons - the buttons (or frames)
      Returns:
      this instance
    • addButton

      @Contract("_ -> this") public AnimatedButton addButton(@NotNull @NotNull Button... button)
      Add button(s)
      Parameters:
      button - the button (or frame)
      Returns:
      this instance
    • getButtons

      public List<Button> getButtons()
      Get the list of buttons
      Returns:
      the buttons
    • getItem

      public Item getItem(@NotNull @NotNull UUID uuid)
      Specified by:
      getItem in interface Button
    • handleAction

      public void handleAction(ClickEvent event)
      Specified by:
      handleAction in interface Button
    • forceSetAction

      public boolean forceSetAction(@NotNull @NotNull UUID uuid)
      Specified by:
      forceSetAction in interface Button
    • init

      public void init()
      Specified by:
      init in interface me.hsgamer.hscore.ui.property.Initializable
    • stop

      public void stop()
      Specified by:
      stop in interface me.hsgamer.hscore.ui.property.Initializable
    • update

      public void update(@NotNull @NotNull UUID uuid)
      Specified by:
      update in interface me.hsgamer.hscore.ui.property.IdentifiedUpdatable