Fix portal creation NPE

This commit is contained in:
Daniel Saukel 2016-08-01 00:06:31 +02:00
parent d22bc7a8ee
commit 9c9bf05b95

View File

@ -176,12 +176,12 @@ public class PlayerListener implements Listener {
}
}
}
}
for (LockedDoor door : dGameWorld.getLockedDoors()) {
if (clickedBlock.equals(door.getBlock()) || clickedBlock.equals(door.getAttachedBlock())) {
event.setCancelled(true);
return;
for (LockedDoor door : dGameWorld.getLockedDoors()) {
if (clickedBlock.equals(door.getBlock()) || clickedBlock.equals(door.getAttachedBlock())) {
event.setCancelled(true);
return;
}
}
}
}