1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Help StringTag!

Discussion in 'Help' started by KaYuuV081, May 13, 2020.

  1. KaYuuV081

    KaYuuV081 Creeper

    Messages:
    4
    GitHub:
    kayuuvn
    Hello everyone, please help me !. When I put the tag for the item ("Tools", "pickaxe") but when I put another StringTag, the Tools tag is lost, is there any way to put 2 tags for the same item? Thank you very much (My English badly)
     
    Last edited: May 13, 2020
  2. KaYuuV081

    KaYuuV081 Creeper

    Messages:
    4
    GitHub:
    kayuuvn
    PHP:
    //my code 
    $item $player->getInventory()->getItemInHand();
    $item->setNamedTagEntry(new StringTag("Tools""pickaxe"));
    $player->getInventory()->setItemInHand($item);
     
  3. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    Uhhh, what
     
  4. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    It only saved one
     
  5. KaYuuV081

    KaYuuV081 Creeper

    Messages:
    4
    GitHub:
    kayuuvn
    Thank you, I think I can find a better alternative :> Thanks for help ^_^
     
  6. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    No problem ^^ It is my pleasure
     
  7. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.