From 02c6fe50d5cc8147425b70148ebfbaa4367357c8 Mon Sep 17 00:00:00 2001 From: filoghost Date: Mon, 12 Dec 2016 19:39:59 +0100 Subject: [PATCH] Fixes #40 --- .../protocollib/current/ProtocolLibHookImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java index ac2b090c..91f64114 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/bridge/protocollib/current/ProtocolLibHookImpl.java @@ -135,15 +135,15 @@ public class ProtocolLibHookImpl implements ProtocolLibHook { } } else if (packet.getType() == PacketType.Play.Server.SPAWN_ENTITY) { - + WrapperPlayServerSpawnEntity spawnEntityPacket = new WrapperPlayServerSpawnEntity(packet); - int objectId = spawnEntityPacket.getType(); - if (objectId != ObjectTypes.ITEM_STACK && objectId != ObjectTypes.ARMOR_STAND) { + Entity entity = spawnEntityPacket.getEntity(event); + + if (entity == null) { return; } - Entity entity = spawnEntityPacket.getEntity(event); - if (entity == null) { + if (!isHologramType(entity.getType())) { return; } @@ -159,7 +159,7 @@ public class ProtocolLibHookImpl implements ProtocolLibHook { } } else if (packet.getType() == PacketType.Play.Server.ENTITY_METADATA) { - + WrapperPlayServerEntityMetadata entityMetadataPacket = new WrapperPlayServerEntityMetadata(packet); Entity entity = entityMetadataPacket.getEntity(event);