Class AbstractMenuBuilder<M extends Menu<M>, T extends AbstractMenuBuilder<M,T> >
java.lang.Object
com.kamikazejam.kamicommon.menu.AbstractMenuBuilder<M,T>
- Direct Known Subclasses:
OneClickMenu.Builder, PaginatedMenu.Builder, SimpleMenu.Builder
@NonExtendable
public abstract class AbstractMenuBuilder<M extends Menu<M>, T extends AbstractMenuBuilder<M,T>>
extends Object
Do not implement this outside KamiCommon. This was a
sealed hierarchy until
spigot-utils dropped to Java 8 so that 1.8.x servers could load it; sealed is Java 17
and has no Java 8 spelling. The closed set is still enforced within the library by the
verifySealedHierarchies build task, which fails if an implementation appears that is
not on the permitted list (SimpleMenu.Builder, PaginatedMenu.Builder, OneClickMenu.Builder). Nothing can enforce it in your code, hence this annotation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MenuEvents<M> protected final PrioritizedMenuIconMap<M> protected final MenuOptions<M> protected @NotNull MenuSizeprotected final @NotNull MenuTitleCalculator -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMenuBuilder(@NotNull MenuSize size, @NotNull MenuEvents<M> events, @NotNull MenuOptions<M> options) -
Method Summary
Modifier and TypeMethodDescriptionfinal Tevents(@NotNull Consumer<MenuEvents<M>> consumer) final TfillerIcon(@Nullable MenuIcon<M> fillerIcon) final @NotNull MenuSizegetSize()final TmodifyIcons(@NotNull Consumer<IMenuIconsAccess<M>> consumer) final Toptions(@NotNull Consumer<MenuOptions<M>> consumer) final Tfinal Ttitle(@NotNull ComponentMenuTitleProvider titleProvider) final Ttitle(@NotNull MenuTitleProvider titleProvider) Deprecated.final TDeprecated.Use more specific methodtitleFromLegacySection(String)final TtitleFromComponent(@Nullable VersionedComponent title) final TtitleFromLegacySection(@Nullable String title) final TtitleFromMiniMessage(@Nullable String title) final TtitleReplacement(@NotNull CharSequence target, @NotNull CharSequence replacement)
-
Field Details
-
size
-
titleCalculator
-
events
-
options
-
-
Constructor Details
-
Method Details
-
getSize
-
title
Deprecated.Use more specific methodtitleFromLegacySection(String) -
titleFromLegacySection
-
titleFromMiniMessage
-
titleFromComponent
-
titleReplacement
@NotNull public final T titleReplacement(@NotNull @NotNull CharSequence target, @NotNull @NotNull CharSequence replacement) -
options
-
events
-
modifyIcons
-
title(ComponentMenuTitleProvider)instead to modify parts of the title.