Class PacketEventsAdapter.VisualContext

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

public static final class PacketEventsAdapter.VisualContext extends Object
Context passed to custom lore formatters.

Contains enchantment information available during lore formatting, allowing formatters to customize the display output.

Since:
0.1.0
  • Constructor Details

    • VisualContext

      public VisualContext(@NotNull @NotNull String enchantmentName, int level, boolean isArtificial)
      Creates a new visual context.
      Parameters:
      enchantmentName - the display name of the enchantment
      level - the enchantment level
      isArtificial - whether this is an artificial enchantment
      Throws:
      NullPointerException - if enchantmentName is null
      Since:
      0.1.0
  • Method Details

    • getEnchantmentName

      @NotNull public @NotNull String getEnchantmentName()
      Gets the enchantment display name.
      Returns:
      the enchantment name
      Since:
      0.1.0
    • getLevel

      public int getLevel()
      Gets the enchantment level.
      Returns:
      the enchantment level
      Since:
      0.1.0
    • isArtificial

      public boolean isArtificial()
      Checks if this is an artificial enchantment.
      Returns:
      true if artificial, false if vanilla
      Since:
      0.1.0