Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7350

Add method to EnchantItemEvent that returns the enchantment shown in the tooltip

XMLWordPrintable

    • CraftBukkit version 3744-Spigot-d1bd3bd-a7cfc77 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)
    • Yes

      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.

            Unassigned Unassigned
            Almighty-Satan Almighty-Satan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: