Help me with skulls.

Discussion in 'Plugin Development' started by danichef, Sep 30, 2016.

Thread Status:
Not open for further replies.
  1. Hi,
    I want to add an specific skull with the specific name that would be this one:
    {display:{Name:"Black Dice"},SkullOwner:{Id:"f607312f-d445-4d0d-9c37-7df2e06d1cf0",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTE1ZjdjMzEzYmNhOWMyZjk1OGU2OGFiMTRhYjM5Mzg2N2Q2NzUwM2FmZmZmOGYyMGNiMTNmYmU5MTdmZDMxIn19fQ=="}]}}}
    To this part of code:
    @EventHandler
    public void onEatDice (PlayerInteractEvent e)
    {
    Player p = e.getPlayer();
    int x = p.getFoodLevel() + 5;
    int j = p.getItemInHand().getAmount() - 1;
    if (((e.getAction() == Action.RIGHT_CLICK_AIR) || (e.getAction() == Action.RIGHT_CLICK_BLOCK)) &&
    ((p.getItemInHand().getType() == Material.Skull)))
    if (p.getItemInHand().getAmount() == 1) {
    p.setFoodLevel(x);

    How would i add the specific head with a name i want?
     
    Last edited: Oct 1, 2016
  2. Offline

    Zombie_Striker

    No one will do this here. If you want someone to make your plugin for you, post the the Plugin requests forum.

    To give that head to the player, use that command to get the instance of that head. After that, store the head's instance to the the config or find some way to get all the data from the head. Whenever you want to add/ remove/ check for that head, get the head instance and do what you want with it.
     
Thread Status:
Not open for further replies.

Share This Page