Ensure that removing an item from the enchanting slot and then putting it back reshuffles the enchantment offers, matching the requested behavior for the item slot (not the lapis slot).
The plugin already auto-fills lapis, but did not change the enchantment seed when the enchantable item was reinserted, so offers could remain the same.
Description
Added ENCHANTING_ITEM_SLOT (slot 0) and a per-player hadEnchantingItem map keyed by UUID to track whether the player had an item in the enchantable slot.
Track initial state on InventoryOpenEvent via trackEnchantingItem and clear tracked state on InventoryCloseEvent to avoid stale entries.
After click/drag actions the plugin now schedules updateEnchantingStateNextTick to re-evaluate the enchanting item slot and when the slot transitions from empty to filled it assigns a fresh seed using HumanEntity#setEnchantmentSeed(ThreadLocalRandom.current().nextInt()) so offers reroll.
Kept existing auto-lapis protection and refill logic intact and reused the next-tick scheduling pattern used for lapis refills.
Testing
Ran ./gradlew compileJava which failed in this environment with a Gradle/toolchain error (25.0.1) so compilation could not be verified here.
### Motivation
- Ensure that removing an item from the enchanting slot and then putting it back reshuffles the enchantment offers, matching the requested behavior for the item slot (not the lapis slot).
- The plugin already auto-fills lapis, but did not change the enchantment seed when the enchantable item was reinserted, so offers could remain the same.
### Description
- Added `ENCHANTING_ITEM_SLOT` (slot `0`) and a per-player `hadEnchantingItem` map keyed by `UUID` to track whether the player had an item in the enchantable slot.
- Track initial state on `InventoryOpenEvent` via `trackEnchantingItem` and clear tracked state on `InventoryCloseEvent` to avoid stale entries.
- After click/drag actions the plugin now schedules `updateEnchantingStateNextTick` to re-evaluate the enchanting item slot and when the slot transitions from empty to filled it assigns a fresh seed using `HumanEntity#setEnchantmentSeed(ThreadLocalRandom.current().nextInt())` so offers reroll.
- Kept existing auto-lapis protection and refill logic intact and reused the next-tick scheduling pattern used for lapis refills.
### Testing
- Ran `./gradlew compileJava` which failed in this environment with a Gradle/toolchain error (`25.0.1`) so compilation could not be verified here.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69c2c063ee64832fb5607783d83ef7bc)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
Description
ENCHANTING_ITEM_SLOT(slot0) and a per-playerhadEnchantingItemmap keyed byUUIDto track whether the player had an item in the enchantable slot.InventoryOpenEventviatrackEnchantingItemand clear tracked state onInventoryCloseEventto avoid stale entries.updateEnchantingStateNextTickto re-evaluate the enchanting item slot and when the slot transitions from empty to filled it assigns a fresh seed usingHumanEntity#setEnchantmentSeed(ThreadLocalRandom.current().nextInt())so offers reroll.Testing
./gradlew compileJavawhich failed in this environment with a Gradle/toolchain error (25.0.1) so compilation could not be verified here.Codex Task