Class MenuIcon<M extends Menu<M>>

java.lang.Object
com.kamikazejam.kamicommon.menu.api.icons.MenuIcon<M>

public class MenuIcon<M extends Menu<M>> extends Object
Represents a menu icon that can contains the ItemStack data as ItemBuilder
This class also holds the click data for the icon, and the auto updating logic for the icon
  • Constructor Details

    • MenuIcon

      public MenuIcon(@NotNull @NotNull ItemBuilder builder)
    • MenuIcon

      public MenuIcon(boolean enabled, @NotNull @NotNull ItemBuilder builder)
    • MenuIcon

      public MenuIcon(boolean enabled, @NotNull @NotNull ItemBuilder... builders)
    • MenuIcon

      public MenuIcon(boolean enabled, @NotNull @NotNull Collection<ItemBuilder> builders)
  • Method Details

    • copy

      @NotNull public @NotNull MenuIcon<M> copy()
    • playClickSound

      public void playClickSound(@NotNull @NotNull Player player)
    • setId

      @NotNull public @NotNull MenuIcon<M> setId(@NotNull @NotNull String id)
    • setAutoUpdate

      @NotNull public @NotNull MenuIcon<M> setAutoUpdate(@NotNull @NotNull StaticIconModifier modifier, int tickInterval)
    • setAutoUpdate

      @NotNull public @NotNull MenuIcon<M> setAutoUpdate(@NotNull @NotNull StatefulIconModifier modifier, int tickInterval)
    • setMenuClick

      @NotNull public @NotNull MenuIcon<M> setMenuClick(@NotNull @NotNull MenuClick<M> click)
    • setModifier

      @NotNull public @NotNull MenuIcon<M> setModifier(@Nullable @Nullable StaticIconModifier modifier)
    • setModifier

      @NotNull public @NotNull MenuIcon<M> setModifier(@Nullable @Nullable StatefulIconModifier modifier)
    • buildItem

      @Internal @Nullable public final @Nullable ItemStack buildItem(int tick, @NotNull @NotNull Player player)
    • isCycleBuilderForTick

      @Internal public final boolean isCycleBuilderForTick(int tick)
    • isAutoUpdateForTick

      @Internal public final boolean isAutoUpdateForTick(int tick)
    • needsModification

      @Internal public final boolean needsModification(int tick)
    • getNextBuilder

      @Nullable public @Nullable ItemBuilder getNextBuilder()
    • getCurrentBuilder

      @Nullable public @Nullable ItemBuilder getCurrentBuilder()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDefaultFillerIcon

      @NotNull public static <M extends Menu<M>> @NotNull MenuIcon<M> getDefaultFillerIcon()