From 34f24f4d60295a1c4f6f3f859431c8c28f7e115b Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 15 Jan 2021 00:29:28 +0100 Subject: [PATCH] Invisible and invulnerable might be a good idea. --- .../core/services/holograms/HologramsService.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java index b49d97d7c..9fe906a7e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java @@ -156,6 +156,8 @@ public class HologramsService { PersistentDataContainer container = hologram.getPersistentDataContainer(); container.set(persistentDataKey, PersistentDataType.LONG, position.getPosition()); + hologram.setInvisible(true); + hologram.setInvulnerable(true); hologram.setSilent(true); hologram.setMarker(true); hologram.setAI(false); @@ -228,7 +230,16 @@ public class HologramsService { private boolean isHologram(@Nonnull Entity n) { if (n instanceof ArmorStand) { ArmorStand armorstand = (ArmorStand) n; - return armorstand.isValid() && armorstand.isSilent() && armorstand.isMarker() && !armorstand.hasAI() && !armorstand.hasGravity(); + + // @formatter:off + return armorstand.isValid() + && armorstand.isInvisible() + && armorstand.isInvulnerable() + && armorstand.isSilent() + && armorstand.isMarker() + && !armorstand.hasAI() + && !armorstand.hasGravity(); + // @formatter:on } else { return false; }