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

Solved Class Item not found in task file!

Discussion in 'Development' started by KHAV, May 26, 2018.

  1. KHAV

    KHAV Baby Zombie

    Messages:
    152
    GitHub:
    xkhhv
    Hello!

    Why when i tried to use
    PHP:
    $item Item::get(30201);
    I get an error that tell me Item not found although i wrote
    PHP:
    use pocketmine\entity\Item;
    This is the error:

    Code:
    [01:45:06] [Server thread/CRITICAL]: Could not execute task TheStory\StoryTask: Class 'pocketmine\entity\Item' not found
    [01:45:06] [Server thread/CRITICAL]: Error: "Class 'pocketmine\entity\Item' not found" (EXCEPTION) in "ItemsMS/src/ItemsMS/ItemsTask" at line 240
    So how i can fix it?
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    KHAV likes this.
  3. KHAV

    KHAV Baby Zombie

    Messages:
    152
    GitHub:
    xkhhv
  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.