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

How can i get item name and id

Discussion in 'Development' started by Alex, Jan 30, 2018.

  1. Alex

    Alex Spider Jockey

    Messages:
    28
    GitHub:
    Bichwha
    if($ev->getPlayer()->getInventory()->getItemInHand()->getId() === 278){ i tried using this im pretty noob at php how can i get the item id and the name?
     
  2. Vincent

    Vincent Silverfish

    Messages:
    16
    GitHub:
    vincent
    Please explain more... Do u mean set a custom name but i cant give a sure fire explanation on how to make a custom id
     
  3. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    PHP:
    if($item->getID() == 278 && $item->getCustomName() == "custom.item.name.here"){
     
  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.