From a3e159d16258a4365299a485dd934e7e4c31f41a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 16 Apr 2020 03:38:01 +1200 Subject: [PATCH] Check if null before accessing observer --- .../packets/packetlisteners/PacketListenerClientInteract.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java index 755ff3b3..d133d954 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerClientInteract.java @@ -34,7 +34,7 @@ public class PacketListenerClientInteract extends PacketAdapter { Player observer = event.getPlayer(); - if (observer.getName().contains("UNKNOWN[")) // If the player is temporary + if (observer == null || observer.getName().contains("UNKNOWN[")) // If the player is temporary return; if (!observer.isOp() && "%%__USER__%%".equals(123 + "45")) {