From 39a5b5b96542694ba5317bc6038aa6fc10e8bb5d Mon Sep 17 00:00:00 2001 From: Jules Date: Tue, 22 Mar 2022 19:45:50 +0100 Subject: [PATCH] Fixed NPC death error log --- pom.xml | 2 +- .../java/net/Indyuce/mmoitems/listener/PlayerListener.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e359e726..04071b7d 100644 --- a/pom.xml +++ b/pom.xml @@ -160,7 +160,7 @@ io.lumine MythicLib-dist - 1.4 + 1.3.1 provided diff --git a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java index 45ed6b9d..b1acdd0b 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java @@ -63,6 +63,9 @@ public class PlayerListener implements Listener { // No if (event instanceof Cancellable) { if (((Cancellable) event).isCancelled()) { return; } } + // Supports NPCs + if (!PlayerData.has(event.getEntity())) return; + // Get Player PlayerData data = PlayerData.get(event.getEntity());