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

Other Drops for breaking a Block.

Discussion in 'Facepalm' started by M4nt0s, Jul 19, 2017.

  1. M4nt0s

    M4nt0s Spider Jockey

    Messages:
    31
    GitHub:
    M4nt0s
    This is working but not every time :/
    I'm sure this is not the best way to do this. But I don't know better.....

    Code:
    public function onBreak(BlockBreakEvent $event){
    $player = $event->getPlayer();
    $player->getInventory()->addItem(Item::get(364,0,16));
     
    Last edited: Jul 19, 2017
  2. M4nt0s

    M4nt0s Spider Jockey

    Messages:
    31
    GitHub:
    M4nt0s
    I have it^^. SOLVED.
     
  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.