Fix PlayerInteractEvent NPE; resolves #789

This commit is contained in:
Daniel Saukel 2020-05-09 13:29:03 +02:00
parent 973bae2d25
commit 4de94822b2
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ public class DWorldListener implements Listener {
return;
}
Block block = event.getClickedBlock();
if (block == null) {
return;
}
GameWorld gameWorld = plugin.getGameWorld(block.getWorld());
if (gameWorld == null || gameWorld.isPlaying()) {
return;