1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

Better support for custom enchants

This commit is contained in:
Zrips 2022-03-10 13:39:39 +02:00
parent 7970b15d02
commit 7e2ac97578

View File

@ -409,7 +409,8 @@ public final class Util {
} }
public static boolean enchantMatchesActionInfo(String enchant, EnchantActionInfo actionInfo) { public static boolean enchantMatchesActionInfo(String enchant, EnchantActionInfo actionInfo) {
String enchantName = CMIEnchantment.get(actionInfo.getName()).toString(); CMIEnchantment e = CMIEnchantment.get(actionInfo.getName());
String enchantName = e != null ? CMIEnchantment.get(actionInfo.getName()).toString() : actionInfo.getName();
return ( return (
// Enchantment without level e.g. silk_touch // Enchantment without level e.g. silk_touch