Search in sources :

Example 6 with CMIHologram

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();
}
Also used : CMIHologram(com.Zrips.CMI.Modules.Holograms.CMIHologram) CMILocation(net.Zrips.CMILib.Container.CMILocation)

Aggregations

CMIHologram (com.Zrips.CMI.Modules.Holograms.CMIHologram)6 RankingValue (com.nextplugins.economy.configuration.RankingValue)4 lombok.val (lombok.val)4 ArrayList (java.util.ArrayList)3 SimpleAccount (com.nextplugins.economy.model.account.SimpleAccount)2 Profile (com.github.juliarn.npc.profile.Profile)1 Hologram (com.gmail.filoghost.holographicdisplays.api.Hologram)1 AnimationValue (com.nextplugins.economy.configuration.AnimationValue)1 ItemBuilder (com.nextplugins.economy.util.ItemBuilder)1 UUID (java.util.UUID)1 CMILocation (net.Zrips.CMILib.Container.CMILocation)1 ArmorStand (org.bukkit.entity.ArmorStand)1 ItemStack (org.bukkit.inventory.ItemStack)1 FixedMetadataValue (org.bukkit.metadata.FixedMetadataValue)1