diff --git a/main/src/main/java/net/citizensnpcs/trait/HologramTrait.java b/main/src/main/java/net/citizensnpcs/trait/HologramTrait.java index 6ac675293..88f24f643 100644 --- a/main/src/main/java/net/citizensnpcs/trait/HologramTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/HologramTrait.java @@ -694,6 +694,13 @@ public class HologramTrait extends Trait { itemNPC = null; } + @Override + public Collection getEntities() { + return itemNPC != null && itemNPC.getEntity() != null + ? ImmutableList.of(hologram.getEntity(), itemNPC.getEntity()) + : Collections.emptyList(); + } + @Override protected void render0(NPC npc, Vector3d offset) { hologram.getEntity().teleport(npc.getStoredLocation().clone().add(offset.x, @@ -743,7 +750,8 @@ public class HologramTrait extends Trait { @Override public void render(NPC npc, Vector3d offset) { - if (hologram == null) { + if (getEntities().isEmpty()) { + destroy(); spawnHologram(npc, offset); } render0(npc, offset);