Class PacketEventsAdapter.VisualContext
java.lang.Object
io.artificial.enchantments.optional.packetevents.PacketEventsAdapter.VisualContext
- Enclosing class:
PacketEventsAdapter
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 Summary
ConstructorsConstructorDescriptionVisualContext(@NotNull String enchantmentName, int level, boolean isArtificial) Creates a new visual context. -
Method Summary
-
Constructor Details
-
VisualContext
Creates a new visual context.- Parameters:
enchantmentName- the display name of the enchantmentlevel- the enchantment levelisArtificial- whether this is an artificial enchantment- Throws:
NullPointerException- if enchantmentName is null- Since:
- 0.1.0
-
-
Method Details
-
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
-