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

How to get item's name

Discussion in 'Development' started by Hoyee, Mar 9, 2020.

  1. Hoyee

    Hoyee Baby Zombie

    Messages:
    126
    PHP:
    $player->getInventory()->getItemInHand()->getId()->getName();
    it says "Call to a member function getName() on int" (EXCEPTION)
     
  2. Gianluxx

    Gianluxx Slime

    Messages:
    94
    GitHub:
    Gianluxx
    $player->getInventory()->getItemInHand()->getName();
     
    HimbeersaftLP likes this.
  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.