From 0a46298b7d98a6ec6220e3a9edc9fe754c18ef52 Mon Sep 17 00:00:00 2001 From: Zrips Date: Sat, 20 Apr 2024 13:26:59 +0300 Subject: [PATCH] Enchant NULL check --- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 3c68b392..b71b0f9d 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -462,7 +462,8 @@ public final class JobsPaymentListener implements Listener { if (item.getType() != Material.AIR && Jobs.getBpManager().isInBp(block)) { for (Enchantment one : item.getEnchantments().keySet()) { - if (CMIEnchantment.get(one).equalEnum(CMIEnchantEnum.SILK_TOUCH)) { + CMIEnchantment enchant = CMIEnchantment.get(one); + if (enchant != null && enchant.equalEnum(CMIEnchantEnum.SILK_TOUCH)) { return; } }