Class ItemVisualProcessor.PreferencesBuilder

java.lang.Object
io.artificial.enchantments.optional.packetevents.ItemVisualProcessor.PreferencesBuilder
Enclosing class:
ItemVisualProcessor

public final class ItemVisualProcessor.PreferencesBuilder extends Object
Fluent builder for creating visual preferences.

Provides a convenient way to construct PacketEventsAdapter.PlayerVisualPreferences with method chaining.

Since:
0.1.0
See Also:
  • Method Details

    • enabled

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder enabled(boolean enabled)
      Sets whether visual customization is enabled.
      Parameters:
      enabled - true to enable customization, false to disable
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • modifyLore

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder modifyLore(boolean modify)
      Sets whether to modify item lore with enchantment information.
      Parameters:
      modify - true to modify lore, false to leave unchanged
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • showGlint

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder showGlint(boolean show)
      Sets whether to show the enchantment glint effect.
      Parameters:
      show - true to show glint, false to hide it
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • hideVanillaEnchantments

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder hideVanillaEnchantments(boolean hide)
      Sets whether to hide vanilla enchantments from display.
      Parameters:
      hide - true to hide vanilla enchantments, false to show them
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • lorePrefix

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder lorePrefix(@Nullable @Nullable String prefix)
      Sets the lore prefix string used for enchantment lines.
      Parameters:
      prefix - the prefix string, or null for default
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • customFormatter

      @NotNull public @NotNull ItemVisualProcessor.PreferencesBuilder customFormatter(@Nullable @Nullable Consumer<PacketEventsAdapter.VisualContext> formatter)
      Sets a custom lore formatter for enchantment display.
      Parameters:
      formatter - the custom formatter callback, or null for default formatting
      Returns:
      this builder for chaining
      Since:
      0.1.0
    • build

      Builds and returns the configured preferences.
      Returns:
      the configured player visual preferences
      Since:
      0.1.0