use of com.gmail.filoghost.holographicdisplays.api.Hologram in project HolographicMenus by DRE2N.
the class HolographicDisplaysWrapper method createHologram.
public Hologram createHologram(Collection<Player> viewers, Location location) {
Hologram hologram = HologramsAPI.createHologram(plugin, location);
if (viewers != null) {
hologram.getVisibilityManager().setVisibleByDefault(false);
viewers.forEach(hologram.getVisibilityManager()::showTo);
}
return hologram;
}
use of com.gmail.filoghost.holographicdisplays.api.Hologram in project Crazy-Crates by Crazy-Crew.
the class HolographicSupport method removeHologram.
public void removeHologram(Block block) {
if (!holograms.containsKey(block))
return;
Hologram hologram = holograms.get(block);
holograms.remove(block);
hologram.delete();
}
use of com.gmail.filoghost.holographicdisplays.api.Hologram in project BetonQuest by BetonQuest.
the class HologramLoop method cancel.
/**
* Cancels hologram updating loop and removes all BetonQuest-registered holograms.
*/
public void cancel() {
if (runnable != null) {
runnable.cancel();
for (final Hologram hologram : holograms.keySet()) {
hologram.getVisibilityManager().resetVisibilityAll();
hologram.delete();
}
}
for (final Entry<Hologram, BukkitRunnable> h : runnables.entrySet()) {
h.getValue().cancel();
h.getKey().delete();
}
}
use of com.gmail.filoghost.holographicdisplays.api.Hologram in project RoseStacker by Rosewood-Development.
the class HolographicDisplaysHologramHandler method createOrUpdateHologram.
@Override
public void createOrUpdateHologram(Location location, String text) {
Hologram hologram = this.holograms.get(location);
if (hologram == null) {
hologram = HologramsAPI.createHologram(RoseStacker.getInstance(), location.clone().add(0, 1, 0));
hologram.appendTextLine(text);
this.holograms.put(location, hologram);
} else {
((TextLine) hologram.getLine(0)).setText(text);
}
}
use of com.gmail.filoghost.holographicdisplays.api.Hologram in project NextEconomy by NextPlugins.
the class NextEconomyCommand method onRankingDebug.
@Command(name = "nexteconomy.rankingdebug", permission = "nexteconomy.admin", async = true)
public void onRankingDebug(Context<CommandSender> context) {
val pluginManager = Bukkit.getPluginManager();
if (!pluginManager.isPluginEnabled("HolographicDisplays")) {
context.sendMessage(ColorUtil.colored("&cO plugin HolographicDisplays precisa estar ativo para usar esta função."));
return;
}
val citizensEnabled = pluginManager.isPluginEnabled("Citizens");
for (val world : Bukkit.getWorlds()) {
for (val entity : world.getEntities()) {
if (!entity.hasMetadata("nexteconomy"))
continue;
if (citizensEnabled) {
val npc = CitizensAPI.getNPCRegistry().getNPC(entity);
if (npc != null) {
CitizensAPI.getNPCRegistry().deregister(npc);
continue;
}
}
entity.remove();
}
}
HologramsAPI.getHolograms(NextEconomy.getInstance()).forEach(Hologram::delete);
if (citizensEnabled) {
try {
for (val npc : CitizensAPI.getNPCRegistry()) {
if (!npc.data().has("nexteconomy"))
continue;
npc.despawn();
npc.destroy();
}
} catch (Exception exception) {
for (val id : NPCRunnable.NPCS) {
val npc = CitizensAPI.getNPCRegistry().getById(id);
if (npc == null)
continue;
CitizensAPI.getNPCRegistry().deregister(npc);
}
}
NPCRunnable.NPCS.clear();
}
context.sendMessage(ColorUtil.colored("&aTodos os NPCs, ArmorStands e Hologramas foram limpos com sucesso."));
}
Aggregations