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

1.16.x Rename Enchantments

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • n/a
    • Yes

      I would like to suggest the renaming of the Enchantments in Bukkit to match the Minecraft namespaces for enchantments, preferably done whilst Bukkit/Spigot/Craftbukkit is updated to 1.16

      WHY:
      The current names for many of the enchantments (Which Im assuming Bukkit did this years ago) make next to no sense at all.
      Ex:
      DAMAGE_ALL = sharpness.
      The docs for this say "Increases damage against all targets"
      For a developer who's been doing this for a while, its fairly simple to figure them out (looking at the source code) but for a developer whom is new the Spigot/Bukkit development, some of these might be hard to decipher.
      In my opinion, these should have been updated in 1.13, when materials and biomes were done, to keep consistency with Minecraft.

      HOW:
      To help reduce the amount of breakage in current plugins, I would recommend maybe adding the new names to the enchantments list, and keeping the old names as deprecated, this way plugins using the old enchantments will still work, but also give them a warning in their IDE to update to the new enchantment names.
      Obviously the returns (for ex: checking the enchants on an ItemStack) would have to return 1 of the 2. I would assume the new ones. I understand this could possibly break some plugins, but in retrospect, I think most plugins using enchantments, are using them to enchant an item vs actually checking if an item is enchanted.

      WHEN:
      This wouldn't make sense to do in 1.14.4, which is why I suggest doing this in 1.15.

      This would be something good to do in 1.16. A lot of new things will be coming in 1.16 that will most likely massively change up the API so I think then is a great time to stir things up!

      I totally understand this getting denied, as it could very possibly break plugins as well as diminish the possibility of backwards compatibility.
      I do however hope it is taken into consideration to help with moving the Bukkit API forward into having better consistency with Minecraft.

      I wanted to make this suggestion early before a lot of development is done on 1.16. Clearly it won't go public for MONTHS, but thought I'd get an early start.

      Thank you for reading, and thank you for the consideration.

      EXTRA:
      I decided to create a thread on the forums to get a general consensus from the community
      https://www.spigotmc.org/threads/1-15-renaming-enchantments.396853/

            Unassigned Unassigned
            ShaneBee Shane Bee
            Votes:
            22 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: