From 269a4bec7275343137339a194d9d7ba09bc9e602 Mon Sep 17 00:00:00 2001 From: filoghost Date: Sat, 11 Apr 2020 21:55:52 +0200 Subject: [PATCH] Handle fake entities (negative ID) --- .../bridge/protocollib/current/ProtocolLibHookImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java index 5cd4ffaa..bf983b0e 100644 --- a/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java +++ b/Plugin/src/main/java/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java @@ -177,6 +177,10 @@ public class ProtocolLibHookImpl implements ProtocolLibHook { private Entity getEntity(PacketEvent packetEvent, EntityRelatedPacketWrapper packetWrapper) { + if (packetWrapper.getEntityID() < 0) { + return null; + } + if (!useGetEntityWorkaround) { try { return packetWrapper.getEntity(packetEvent);