Holographic Displays Player head item hologram

Discussion in 'Spigot Plugin Help' started by flipmaster357, Jul 15, 2021.

  1. Hello i wanted to ask is it possible to add a player head skull ID inside the item hologram

    Since i tested a lot of different stuff to add a player head ID inside a hologram but never gotten it to work.

    Anyone got an answer for this ?
     
  2. Yes. possible

    Here code
    Code (Text):
    Location loc = player.getLocation().add(0.0, 2.0, 0.0);
    ItemStack itemStack = new ItemStack(Material.MELON_BLOCK);
    final Hologram hologram = HologramsAPI.createHologram(plugin, loc);
    ItemLine itemLine = hologram.appendItemLine(itemStack);

    new BukkitRunnable() {
        @Override
        public void run() {
            itemLine.setItemStack(new ItemStack(Material.SKULL_ITEM));
        }
    }.runTaskLater(plugin, 5 * 20);
     
  3. Well i tend to learn coding in general but i am not sure i can use that since i do not know how to. I am aware of the command
    /hd create test ICON: player_head
    Could i add an ID thru the command? (which was my question)

    I have tested via many options of getting a player head.. but they can be only executed via command block due to being large commands.
     
  4. Check this wiki https://filoghost.me/docs/holographic-displays/icons