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

Item Config

Discussion in 'Development' started by xXNiceAssassinlo YT, Apr 17, 2018.

  1. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
  2. Az928

    Az928 Baby Zombie

    Messages:
    140
    GitHub:
    theaz928
    PHP:
    $data explode(":"$string); // "stone:0:1"
    $item Item::fromString($data[0]);
    $item->setDamage((int) $data[1]);
    $item->setCount(max(1, (int) $data[2]));
    // rest figure out yourself, it's pretty easy if you know the function unset, array_values and array related functions ;)

     
  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.