diff --git a/src/de/steamwar/lobby/display/Hologram.java b/src/de/steamwar/lobby/display/Hologram.java index 7a2e68a..ab4662b 100644 --- a/src/de/steamwar/lobby/display/Hologram.java +++ b/src/de/steamwar/lobby/display/Hologram.java @@ -89,17 +89,15 @@ public class Hologram implements ConfigurationSerializable { private final String id; private final Location location; private final String text; - private final boolean persistent; public Hologram(Map map) { - this((String) map.get("id"), (Location) map.get("location"), (String) map.get("text"), true); + this((String) map.get("id"), (Location) map.get("location"), (String) map.get("text")); } - public Hologram(String id, Location location, String text, boolean persistent) { + public Hologram(String id, Location location, String text) { this.id = id; this.location = location; this.text = text; - this.persistent = persistent; entityId = entityIds--; spawnLiving = spawnLivingPacketConstructor.invoke(); @@ -115,7 +113,7 @@ public class Hologram implements ConfigurationSerializable { display = new Displayable(location, this::show, this::hide); - if(persistent) + if(id != null) holograms.add(this); } @@ -150,7 +148,7 @@ public class Hologram implements ConfigurationSerializable { public void delete() { display.delete(); - if(persistent) + if(id != null) holograms.remove(this); } }