From 7e2ac975783edeb69451cdb1af1d98d0804cb06a Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 10 Mar 2022 13:39:39 +0200 Subject: [PATCH] Better support for custom enchants --- src/main/java/com/gamingmesh/jobs/stuff/Util.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/stuff/Util.java b/src/main/java/com/gamingmesh/jobs/stuff/Util.java index d09c7fb9..32ffaf6e 100644 --- a/src/main/java/com/gamingmesh/jobs/stuff/Util.java +++ b/src/main/java/com/gamingmesh/jobs/stuff/Util.java @@ -409,7 +409,8 @@ public final class Util { } 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 ( // Enchantment without level e.g. silk_touch