Prevent Items from Trees falling

Discussion in 'Plugin Development' started by Blockhead7360, Sep 2, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Blockhead7360

    Hello!

    I was wondering if there was anyway to prevent the items from Trees (saplings and apples, not wood though) from falling?
     
  2. Offline

    ShadowLAX

    @Blockhead7360 Listen for the BlockBreakEvent. Check if the block broken is leaves, and if so cancel the event. Then set the block's type to air.
     
  3. When there's no logs left it does it anyways.
     
  4. Offline

    AdobeGFX

    Try using LeavesDecayEvent
     
  5. Offline

    ShadowLAX

    That's because BlockBreakEvent is only fired when a player breaks a block. To cancel leaves decaying, listen for LeavesDecayEvent.
     
  6. ye that's what you needed to say aswell.
     
  7. Offline

    Blockhead7360

Thread Status:
Not open for further replies.

Share This Page