ItemAbilityServiceImpl

class ItemAbilityServiceImpl(key: NamespacedKey) : ItemAbilityService

Stores an ability ID in the item's persistent data.

Constructors

Link copied to clipboard
constructor(plugin: JavaPlugin)

Creates the data key used for item ability IDs.

constructor(key: NamespacedKey)

Functions

Link copied to clipboard
open override fun assign(item: ItemStack, abilityId: String)

Saves an ability ID on the item.

Link copied to clipboard
open override fun get(item: ItemStack): String?

Reads the ability ID saved on the item.

Link copied to clipboard
open override fun remove(item: ItemStack)

Removes the ability ID saved on the item.