SurfBukkitPacketApi

The SurfBukkitPacketApi interface extends packet handling capabilities for Bukkit environments.

It provides methods for registering and unregistering lore listeners, enabling dynamic modification of item stack lore based on custom logic. It also includes global registration methods for listening to all items and utilities for managing these listeners efficiently.

This API allows developers to enhance item lore dynamically, providing a flexible system for plugins that need to alter or interact with lore without directly modifying the underlying item stack data.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun registerPacketLoreListener(identifier: NamespacedKey, listener: SurfBukkitPacketLoreHandler)

Registers a listener for modifying the lore of a specific item stack identified by the given key.

open fun registerPacketLoreListener(identifier: NamespacedKey, listener: SurfBukkitPacketLoreHandlerSimple)

Registers a simplified packet lore listener for a specific item.

Link copied to clipboard
abstract fun registerPacketLoreListenerGlobal(plugin: Plugin, listener: SurfBukkitPacketLoreHandler)

Registers a packet lore listener globally to handle lore modifications for all items.

Registers a simplified packet lore listener globally for all items.

Link copied to clipboard
abstract fun unregisterPacketLoreListener(identifier: NamespacedKey)

Unregisters a previously registered packet lore listener identified by the given key.

abstract fun unregisterPacketLoreListener(plugin: Plugin)

Unregisters all packet lore listeners associated with the given plugin.