Class AnimatedButton

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

public class AnimatedButton extends Object implements Button, 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
    • display

      public DisplayButton display(@NotNull @NotNull UUID uuid)
      Description copied from interface: Button
      Display the button
      Specified by:
      display in interface Button
      Parameters:
      uuid - the unique id
      Returns:
      the display button
    • init

      public void init()
      Description copied from interface: Initializable
      Initialize some properties for the object
      Specified by:
      init in interface Initializable
    • stop

      public void stop()
      Description copied from interface: Initializable
      Stop the object
      Specified by:
      stop in interface Initializable
    • update

      public void update(@NotNull @NotNull UUID uuid)
      Description copied from interface: IdentifiedUpdatable
      Update the updatable object
      Specified by:
      update in interface IdentifiedUpdatable
      Parameters:
      uuid - the identifier