Make enchantments case insensitive.
Lowercasing the enchantment string before feeding it to the Bukkit API makes the enchantments a little more "copy/paste proof" when grabbing the uppercased names from the JavaDocs/Minecraft wiki.
This commit is contained in:
parent
5e7cb2a82b
commit
74a7388701
|
@ -15,6 +15,7 @@ These changes will (most likely) be included in the next version.
|
|||
- Unbreakable weapons and armor now use the unbreakable item flag instead of item durability and on-hit repairs. This means that MobArena's unbreakable items are now compatible with plugins that depend on special durability values, such as QualityArmory.
|
||||
- Spectators can no longer take damage when the arena isn't running.
|
||||
- Pets can now teleport back to their owners if they get too far away.
|
||||
- Enchantment names are now case insensitive (i.e. `FIRE_PROTECTION` is the same as `fire_protection`).
|
||||
|
||||
## [0.103] - 2018-08-28
|
||||
- It is now possible to add a fixed delay (in seconds) between waves with the new per-arena setting `next-wave-delay`.
|
||||
|
|
|
@ -160,6 +160,6 @@ public class ItemParser
|
|||
}
|
||||
|
||||
private static Enchantment getEnchantment(String ench) {
|
||||
return Enchantment.getByKey(NamespacedKey.minecraft(ench));
|
||||
return Enchantment.getByKey(NamespacedKey.minecraft(ench.toLowerCase()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue