Class PacketEventsAdapter.PlayerVisualPreferences

java.lang.Object
io.artificial.enchantments.optional.packetevents.PacketEventsAdapter.PlayerVisualPreferences
Enclosing class:
PacketEventsAdapter

public static final class PacketEventsAdapter.PlayerVisualPreferences extends Object
Per-player visual customization preferences.

These settings control how enchanted items appear to a specific player without affecting the actual item state or how other players see the item.

Since:
0.1.0
  • Constructor Details

    • PlayerVisualPreferences

      public PlayerVisualPreferences()
      Creates default preferences (all customization enabled).
      Since:
      0.1.0
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Checks if visual customization is enabled.
      Returns:
      true if customization is enabled
      Since:
      0.1.0
    • setEnabled

      public PacketEventsAdapter.PlayerVisualPreferences setEnabled(boolean enabled)
      Sets whether visual customization is enabled.
      Parameters:
      enabled - true to enable, false to disable
      Returns:
      this preferences object for chaining
      Since:
      0.1.0
    • isModifyLore

      public boolean isModifyLore()
      Checks if lore modification is enabled.
      Returns:
      true if lore will be modified
      Since:
      0.1.0
    • setModifyLore

      public PacketEventsAdapter.PlayerVisualPreferences setModifyLore(boolean modifyLore)
      Sets whether to modify item lore.
      Parameters:
      modifyLore - true to modify lore, false to leave unchanged
      Returns:
      this preferences object for chaining
      Since:
      0.1.0
    • isShowEnchantmentGlint

      public boolean isShowEnchantmentGlint()
      Checks if enchantment glint should be shown.
      Returns:
      true if glint is enabled
      Since:
      0.1.0
    • setShowEnchantmentGlint

      public PacketEventsAdapter.PlayerVisualPreferences setShowEnchantmentGlint(boolean showEnchantmentGlint)
      Sets whether to show the enchantment glint effect.
      Parameters:
      showEnchantmentGlint - true to show glint, false to hide
      Returns:
      this preferences object for chaining
      Since:
      0.1.0
    • isHideVanillaEnchantments

      public boolean isHideVanillaEnchantments()
      Checks if vanilla enchantments should be hidden.
      Returns:
      true if vanilla enchantments are hidden
      Since:
      0.1.0
    • setHideVanillaEnchantments

      public PacketEventsAdapter.PlayerVisualPreferences setHideVanillaEnchantments(boolean hideVanillaEnchantments)
      Sets whether to hide vanilla enchantments from display.
      Parameters:
      hideVanillaEnchantments - true to hide, false to show
      Returns:
      this preferences object for chaining
      Since:
      0.1.0
    • getLorePrefix

      @Nullable public @Nullable String getLorePrefix()
      Gets the lore prefix string.
      Returns:
      the prefix string, or null if not set
      Since:
      0.1.0
    • setLorePrefix

      public PacketEventsAdapter.PlayerVisualPreferences setLorePrefix(@Nullable @Nullable String lorePrefix)
      Sets the lore prefix string.
      Parameters:
      lorePrefix - the prefix string, or null for default
      Returns:
      this preferences object for chaining
      Since:
      0.1.0
    • getCustomLoreFormatter

      @Nullable public @Nullable Consumer<PacketEventsAdapter.VisualContext> getCustomLoreFormatter()
      Gets the custom lore formatter.
      Returns:
      the custom formatter, or null if not set
      Since:
      0.1.0
    • setCustomLoreFormatter

      public PacketEventsAdapter.PlayerVisualPreferences setCustomLoreFormatter(@Nullable @Nullable Consumer<PacketEventsAdapter.VisualContext> customLoreFormatter)
      Sets a custom lore formatter for enchantment display.
      Parameters:
      customLoreFormatter - the custom formatter, or null for default
      Returns:
      this preferences object for chaining
      Since:
      0.1.0