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

Chest break event?

Discussion in 'Development' started by Zorlac, Sep 4, 2019.

  1. Zorlac

    Zorlac Spider

    Messages:
    11
    I've been poking around the source code and haven't seen anything jump out at me yet. Nothing in Events, nothing in the Block class, etc.

    I'm trying to intercept the chest breaking event when it drops the contents on the ground so I can look for a specific blocked item and remove it.
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Simply listen to BlockBreakEvent
    Get drops from $event->getDrops() and when you are done removing $event->setDrops($itemArray)
     
  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.