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

setDrops() on BlockBreakEvent?

Discussion in 'Development' started by Zuruki, Apr 9, 2017.

  1. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    Not to sure as always, I'm in the same position as you :p
     
  2. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    setCount() is undefined. What is the use pocketmine\ code for this?
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you dont need to USE something to make something defined
     
  4. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    OK, I found it out, the code is:
    PHP:
    $drops = new Item(<id>, 0, <amount>)
    I think the 0 in-between is used for an ID like 17:2, that means: (17,2,5)
     
  5. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    Yes. The middle integer is used for meta
     
  6. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    Why would you tell pocketmine that your plugin listens for events when you plugin is being disabled and won't be any use after that? You only need to register events once.
     
  7. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    Seems logical. Idk, I was just seeing if it would work xD
     
  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.