@EventHandler public void onPlayerDeath(PlayerDeathEvent event) { Hologram hologram = HologramsAPI.createHologram(this, event.getEntity().getEyeLocation()); hologram.appendTextLine(ChatColor.RED + "Player " + ChatColor.GOLD + event.getEntity().getName() + ChatColor.RED + " died here!"); hologram.appendTextLine(ChatColor.GRAY + "Time of death: " + new SimpleDateFormat("H:m").format(new Date())); } }
private Hologram createPlayerStatisticHologram(Player player, Location holoLocation) { final Hologram holo = HologramsAPI.createHologram(BedwarsRel.getInstance(), holoLocation); holo.getVisibilityManager().setVisibleByDefault(false); holo.getVisibilityManager().showTo(player); this.updatePlayerStatisticHologram(player, holo); return holo; }
private Hologram createPlayerStatisticHologram(Player player, Location holoLocation) { final Hologram holo = HologramsAPI.createHologram(BedwarsRel.getInstance(), holoLocation); holo.getVisibilityManager().setVisibleByDefault(false); holo.getVisibilityManager().showTo(player); this.updatePlayerStatisticHologram(player, holo); return holo; }
@Override public void onInit() { if (Bukkit.getPluginManager().getPlugin("HolographicDisplays") == null) { markAsErroneous("HolographicDisplays not enabled"); return; } getSign().getBlock().setType(VanillaItem.AIR.getMaterial()); String[] holoLines = lines[1].split("/"); Location location = getSign().getLocation(); location = location.add(0.5, NumberUtil.parseDouble(lines[2]), 0.5); hologram = HologramsAPI.createHologram(plugin, location); for (String line : holoLines) { if (line.startsWith("Item:")) { String id = line.replace("Item:", ""); ItemStack item = null; ExItem exItem = plugin.getCaliburn().getExItem(id); if (exItem != null) { item = exItem.toItemStack(); } hologram.appendItemLine(item); } else { hologram.appendTextLine(ChatColor.translateAlternateColorCodes('&', line)); } } }
final Hologram hologram = HologramsAPI.createHologram(this, event.getEntity().getLocation().add(0.0, 0.9, 0.0)); hologram.appendTextLine(ChatColor.AQUA + "" + ChatColor.BOLD + "Speed PowerUp"); ItemLine icon = hologram.appendItemLine(new ItemStack(Material.SUGAR));
public DGroupTag(DungeonsXL plugin, DGamePlayer player) { this.player = player; DGroup group = player.getDGroup(); if (group != null) { hologram = HologramsAPI.createHologram(plugin, player.getPlayer().getLocation().clone().add(0, 3.5, 0)); hologram.appendItemLine(group.getDColor().getWoolMaterial().toItemStack()); hologram.appendTextLine(group.getName()); } }
continue; Hologram hologram = HologramsAPI.createHologram(BetonQuest.getInstance(), location); hologram.getVisibilityManager().setVisibleByDefault(false); for (String line : lines) {
hologramEnabled = true; if (npcHologram.hologram == null) { Hologram hologram = HologramsAPI.createHologram(BetonQuest.getInstance(), npc.getStoredLocation().add(npcHologram.config.vector)); hologram.getVisibilityManager().setVisibleByDefault(false); for (String line : npcHologram.config.settings.getStringList("lines")) {