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:
parent
bf047ce1f2
commit
0a46298b7d
@ -462,7 +462,8 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
if (item.getType() != Material.AIR && Jobs.getBpManager().isInBp(block)) {
|
if (item.getType() != Material.AIR && Jobs.getBpManager().isInBp(block)) {
|
||||||
for (Enchantment one : item.getEnchantments().keySet()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user