From 356519be19e1c5ba989b04f2f46b16d36c2086a4 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 25 Mar 2020 22:15:34 +1300 Subject: [PATCH] Do that fix for main packet listener too --- .../utilities/packets/packetlisteners/PacketListenerMain.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerMain.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerMain.java index 8da6f903..98cc9a69 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerMain.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerMain.java @@ -29,7 +29,8 @@ public class PacketListenerMain extends PacketAdapter { final Player observer = event.getPlayer(); - if (observer.getName().contains("UNKNOWN[")) // If the player is temporary + if (observer == null || observer.getName() == null || + observer.getName().contains("UNKNOWN[")) // If the player is temporary return; // First get the entity, the one sending this packet