From fe92c86584f3394a39ad115517d1bc8aa0a012cd Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 26 Dec 2018 22:09:14 -0500 Subject: [PATCH] Ignore null EquipmentSlot, fixes #592 --- src/main/java/me/blackvein/quests/PlayerListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/me/blackvein/quests/PlayerListener.java b/src/main/java/me/blackvein/quests/PlayerListener.java index df544d870..e76c33ddf 100644 --- a/src/main/java/me/blackvein/quests/PlayerListener.java +++ b/src/main/java/me/blackvein/quests/PlayerListener.java @@ -190,6 +190,9 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerInteract(PlayerInteractEvent evt) { EquipmentSlot e = evt.getHand(); //Get the hand of the event and set it to 'e'. + if (e == null) { + return; + } if (e.equals(EquipmentSlot.HAND)) { //If the event is fired by HAND (main hand) if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {