handleLore
Handles the modification of the lore of an item stack.
Parameters
A mutable list of lore components representing the text displayed on the item stack. - The list initially contains the item's "real" lore and any lore added by other lore handlers. - Implementations can append, remove, or insert lore components to influence the displayed text. - Adding lore at the beginning of the list will give it higher visual priority.
A read-only view of the persistent data container associated with the item stack. This allows accessing custom metadata or additional item-specific information without modifying the container directly.
The item stack being modified. Provides access to the item's properties and allows contextual decisions to be made when updating its lore.
Example Usage:
val handler = SurfBukkitPacketLoreHandler { lore, data, item ->
val customLore = Component.text("Special Item!")
lore.add(0, customLore) // Add at the top of the lore list
}