Enchantment seekers
Enchantment seekers, or seekers, are responsible for finding the enchantment in the player's inventory.
Creating a seeker
To start, create a class that implements the interface RegistrableEnchantmentSeeker
.
class MySeeker : RegistrableEnchantmentSeeker {
override val aliases = listOf<String>()
override fun seekItems(player: Player): List<ItemStack?> = listOf()
}
Fill the aliases list with however you want to identify your seeker.
Finding the items
All that the seeker does is select the items from the player inventory. These items later get checked for enchantments internally. As such, the seeker should simply return the list of all the (nullable) items to check: