mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Fixed NPE on portal creation
This commit is contained in:
parent
cbbd3166d4
commit
e7c3cce7cf
@ -147,7 +147,7 @@ public class GlobalProtectionListener implements Listener {
|
||||
}
|
||||
ItemStack item = event.getItem();
|
||||
Block block = event.getClickedBlock();
|
||||
if (item.getType() != LegacyUtil.WOODEN_SWORD || block == null) {
|
||||
if (item == null || item.getType() != LegacyUtil.WOODEN_SWORD || block == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user