Class SimpleButton

java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.SimpleButton
All Implemented Interfaces:
Button, me.hsgamer.hscore.ui.property.Initializable
Direct Known Subclasses:
NullButton

public class SimpleButton extends Object implements Button
A simple button
  • Constructor Details

    • SimpleButton

      public SimpleButton(@NotNull @NotNull Function<@NotNull UUID,@Nullable Item> itemFunction, @NotNull @NotNull Consumer<@NotNull ClickEvent> consumer)
      Create a new simple button
      Parameters:
      itemFunction - the item function
      consumer - the consumer
    • SimpleButton

      public SimpleButton(@Nullable @Nullable Item item, @NotNull @NotNull Consumer<@NotNull ClickEvent> consumer)
      Create a new button
      Parameters:
      item - the item
      consumer - the consumer
  • Method Details

    • getItem

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

      public void handleAction(@NotNull @NotNull ClickEvent event)
      Specified by:
      handleAction in interface Button