Solved pocketmine api 4 get item

Discussion in 'Development' started by FresherGAMING, Feb 11, 2022.

  1. FresherGAMING

    FresherGAMING Spider Jockey

    Messages:
    41
    GitHub:
    FresherGAMING
    How to get item in api 4 ?

    I tried
    PHP:
    Item::get($id$meta$count)
    but it didnt work
     
  2. bruno99

    bruno99 Spider

    Messages:
    13
    GitHub:
    udachin26
    Hi! Try this:
    PHP:
     $item ItemFactory::getInstance()->get($id$meta$count);
     
    FresherGAMING likes this.
  3. FresherGAMING

    FresherGAMING Spider Jockey

    Messages:
    41
    GitHub:
    FresherGAMING
    It worked tysm
     
    bruno99 likes this.
  4. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    if you want to get a Vanilla Items then you should use VanillaItems::ITEM_NAME()
     
    minijaham and Primus like this.

Share This Page

  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.