mirror of
https://github.com/rockyhawk64/CommandPanels.git
synced 2025-11-18 07:14:17 +01:00
Enchanted minecraft namespace bug
This commit is contained in:
parent
96577a3692
commit
79cbd45c17
@ -296,7 +296,7 @@ public class ItemCreation {
|
||||
String enchant = enchantment.split("\\s")[0];
|
||||
NamespacedKey key = enchant.contains(":") ?
|
||||
NamespacedKey.fromString(enchant) :
|
||||
NamespacedKey.minecraft(enchant);
|
||||
NamespacedKey.minecraft(enchant.toLowerCase());
|
||||
EnchantMeta.addEnchant(Objects.requireNonNull(EnchantmentWrapper.getByKey(key)), Integer.parseInt(enchantment.split("\\s")[1]), true);
|
||||
}
|
||||
s.setItemMeta(EnchantMeta);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user