Fixed NPE on portal creation

This commit is contained in:
Daniel Saukel 2018-04-27 15:13:03 +02:00
parent cbbd3166d4
commit e7c3cce7cf

View File

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