From fcb1078f2919e9e6699035b9b680396b6d2efba2 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Sat, 25 Apr 2020 15:49:21 -0400 Subject: [PATCH] Ensure new movement location is not null, fixes #1256 --- .../java/me/blackvein/quests/listeners/PlayerListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java b/main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java index 37e02cf43..faac01850 100644 --- a/main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java +++ b/main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java @@ -818,10 +818,10 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerMove(PlayerMoveEvent evt) { - if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) { + if (evt.getPlayer() == null || evt.getTo() == null) { return; } - if (evt.getPlayer() == null) { + if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) { return; } if (plugin.getDependencies().getCitizens() != null) {