Remove static hologram methods

This commit is contained in:
Eric 2020-03-25 14:05:07 +01:00
parent 1faac3854e
commit 7d9ff86dc5

View File

@ -11,31 +11,6 @@ import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
public class Hologram {
private static final List<Hologram> HOLOGRAMS = new ArrayList<>();
/**
* @param armorStand Armor stand that's part of a hologram
* @return Hologram, the armor stand is part of
*/
public static Hologram getHologram(ArmorStand armorStand) {
for (Hologram hologram : HOLOGRAMS) {
if (hologram.contains(armorStand)) {
return hologram;
}
}
return null;
}
/**
* @param armorStand Armor stand to check
* @return Whether the armor stand is part of a hologram
*/
public static boolean isPartOfHologram(ArmorStand armorStand) {
return getHologram(armorStand) != null;
}
// concurrent since update task is in async thread
// since this is a fake entity, hologram is hidden per default
private final Set<UUID> viewers = Collections.newSetFromMap(new ConcurrentHashMap<UUID, Boolean>());
@ -54,7 +29,6 @@ public class Hologram {
}
this.exists = true;
HOLOGRAMS.add(this);
}
/**
@ -148,7 +122,6 @@ public class Hologram {
wrappers.clear();
exists = false;
HOLOGRAMS.remove(this);
}
/**