From 9c9bf05b95aa5274e1311c1dea737801ab904149 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 1 Aug 2016 00:06:31 +0200 Subject: [PATCH] Fix portal creation NPE --- .../dre2n/dungeonsxl/listener/PlayerListener.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java b/core/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java index 62a00305..20fa1edd 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java @@ -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; + } } } }