use of com.Zrips.CMI.Modules.Holograms.CMIHologram in project RoseStacker by Rosewood-Development.
the class CMIHologramHandler method createOrUpdateHologram.
@Override
public void createOrUpdateHologram(Location location, String text) {
CMIHologram hologram = this.holograms.get(location);
if (hologram == null) {
hologram = new CMIHologram(StackerUtils.locationAsKey(location), new CMILocation(location.clone().add(0, 1, 0)));
hologram.setLines(Collections.singletonList(text));
this.hologramManager.addHologram(hologram);
this.holograms.put(location, hologram);
} else {
hologram.setLines(Collections.singletonList(text));
}
hologram.update();
}
Aggregations