13
0
Dieser Commit ist enthalten in:
Lixfel 2021-10-04 16:43:42 +02:00
Ursprung 4fd06912c7
Commit e1b0bdfc72

Datei anzeigen

@ -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<String, Object> 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);
}
}