Stopping apple dropping from leaves in ALL cases

Discussion in 'Plugin Development' started by TomShar, Jul 31, 2012.

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

    TomShar

    I've tried many things with events but i can't figure anything out
     
  2. Offline

    Bavestry

    This SHOULD work, using the LeavesDecayEvent:
    Code:
    public void onLeavesDecay(LeavesDecayEvent event){
    Block leaf = event.getBlock();
    ItemStack leaves = new ItemStack(Material.LEAVES);
     
    if(leaf.breakNaturally()){
    leaf.getDrops().equals(leaves);
    }else{
    leaf.getDrops().equals(leaves);
    }
    }
    
    Tell me if you have any other problems.
     
Thread Status:
Not open for further replies.

Share This Page