1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Enchant NULL check

This commit is contained in:
Zrips 2024-04-20 13:26:59 +03:00
parent bf047ce1f2
commit 0a46298b7d

View File

@ -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;
}
}