Chest break event?

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

  1. Zorlac

    Zorlac Spider

    Messages:
    10
    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

    Messages:
    358
    Simply listen to BlockBreakEvent
    Get drops from $event->getDrops() and when you are done removing $event->setDrops($itemArray)
     

Share This Page

  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.