1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Invisible and invulnerable might be a good idea.

This commit is contained in:
TheBusyBiscuit 2021-01-15 00:29:28 +01:00
parent d84a2e37a3
commit 34f24f4d60

View File

@ -156,6 +156,8 @@ public class HologramsService {
PersistentDataContainer container = hologram.getPersistentDataContainer(); PersistentDataContainer container = hologram.getPersistentDataContainer();
container.set(persistentDataKey, PersistentDataType.LONG, position.getPosition()); container.set(persistentDataKey, PersistentDataType.LONG, position.getPosition());
hologram.setInvisible(true);
hologram.setInvulnerable(true);
hologram.setSilent(true); hologram.setSilent(true);
hologram.setMarker(true); hologram.setMarker(true);
hologram.setAI(false); hologram.setAI(false);
@ -228,7 +230,16 @@ public class HologramsService {
private boolean isHologram(@Nonnull Entity n) { private boolean isHologram(@Nonnull Entity n) {
if (n instanceof ArmorStand) { if (n instanceof ArmorStand) {
ArmorStand armorstand = (ArmorStand) n; 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 { } else {
return false; return false;
} }