[SPIGOT-7350] Add method to EnchantItemEvent that returns the enchantment shown in the tooltip Created: 05/May/23  Updated: 25/Dec/24  Resolved: 12/Jun/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Almighty-Satan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: EnchantTables, Event, enchantment

Attachments: PNG File Screenshot from 2023-05-05 22-05-45.png    
Version: CraftBukkit version 3744-Spigot-d1bd3bd-a7cfc77 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When a player hovers over an enchantment option in the enchantment table they will see a tooltip that shows one of the enchantments that will be applied (e.g. Sharpness I). This functionality was added in MC 1.8 but there is currently no way of knowing which enchantment was shown in the tooltip because EnchantItemEvent#getEnchantsToAdd returns an unordered map. Therefore I suggest adding a method EnchantItemEvent#getTooltipEnchant that returns the Enchantment shown in the tooltip.


Generated at Tue Apr 08 03:01:14 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.