[SPIGOT-1505] An event that triggers when the Mending enchantment repairs an item. Created: 21/Feb/16 Updated: 26/Dec/18 Resolved: 26/Dec/18 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | kukelekuuk | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 5 |
Labels: | None |
Description |
I want to be able to control who can and cannot use the mending enchantment. Or maybe even disable it entirely. So a cancellable event that gets triggered when the Mending enchantment uses up XP to repair an item would be nice. |
Comments |
Comment by md_5 [ 26/Dec/18 ] |
This was added https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/PlayerItemMendEvent.html |
Comment by hellboyPS [ 02/Apr/16 ] |
So, I've been thinking about possible ways to do this, and this is what I've come up with. First, a summary of mending: Proposal) PlayerItemMendingEvent (or InventoryMendItemEvent) Another possibility is to change the PlayerExpChangeEvent so that the mending enchant is incorporated. I personally do not see a sensible solution doing this, and as such I lean in favor of adding a new event as described above. Maybe there are other/better ways to handle mending or improvements to this proposal? I'd love some feedback. |