From 324c675055f112f2d468407511cc5636eeef7f61 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 25 Mar 2020 21:52:52 +1300 Subject: [PATCH] I don't know why this would be null, but thats what the error says.. --- .../packetlisteners/PacketListenerViewSelfDisguise.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerViewSelfDisguise.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerViewSelfDisguise.java index 93b20d47..36c19ef2 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerViewSelfDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerViewSelfDisguise.java @@ -40,7 +40,8 @@ public class PacketListenerViewSelfDisguise extends PacketAdapter { try { 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; }