@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)); } } }
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()); } }
hologram.appendItemLine(new ItemStack(Material.matchMaterial(line.substring(5)))); } else { hologram.appendTextLine(line.replace('&', '§'));
for (String line : npcHologram.config.settings.getStringList("lines")) { if (line.startsWith("item:")) { hologram.appendItemLine(new ItemStack(Material.matchMaterial(line.substring(5)))); } else { hologram.appendTextLine(line.replace('&', '§'));