diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/hologram/HologramText.java b/plugin/src/main/java/lol/pyr/znpcsplus/hologram/HologramText.java index 2c66aef..47e5e91 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/hologram/HologramText.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/hologram/HologramText.java @@ -6,15 +6,25 @@ import lol.pyr.znpcsplus.entity.EntityPropertyRegistryImpl; import lol.pyr.znpcsplus.packets.PacketFactory; import lol.pyr.znpcsplus.util.NpcLocation; import net.kyori.adventure.text.Component; +import org.bukkit.entity.Player; public class HologramText extends HologramLine { + private static final Component BLANK = Component.text("%blank%"); + public HologramText(EntityPropertyRegistryImpl propertyRegistry, PacketFactory packetFactory, NpcLocation location, Component text) { super(text, packetFactory, EntityTypes.ARMOR_STAND, location); addProperty(propertyRegistry.getByName("name")); addProperty(propertyRegistry.getByName("invisible")); } + @Override + public void show(Player player) { + if (!getValue().equals(BLANK)) { + super.show(player); + } + } + @SuppressWarnings("unchecked") @Override public T getProperty(EntityProperty key) {