-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
CraftBukkit version 4248-Spigot-491f367-ae4f5a0 (MC: 1.21)
-
Yes
I know Enchantment#getName is deprecated and is not recommended to be used anymore, however, this function continued to return the correct name (although badly named) until version 1.21.
for (Enchantment enchantment : Registry.ENCHANTMENT) { System.out.println("Enchantment [" + enchantment.getKey().getKey() + "]. getName() return " + enchantment.getName()); }
I ran the code above in two different Spigot versions, 1.20.6 and 1.21. and the outputs are attached below. You can see that Enchantment#getName() returns an incorrect name in version 1.21.
For example, getName() of the Efficiency enchantment returns DEPTH_STRIDER instead of DIG_SPEED.