Allow Explosions, but disable block drops.

Discussion in 'Bukkit Help' started by Blunderblast, Dec 20, 2014.

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

    Blunderblast

    Hello! I'm looking for a way to allow explosions on my server, but disable the dr0p of items from said explosions, as I am using CreeperHeal and do not want people to exploit blowing stuff up over and over again to get more and more blocks.

    Thanks in advance! ^-^
     
  2. Offline

    API_Tutorials

    @Blunderblast
    Code:
    @EventHandler(priority = EventPriority.HIGHEST)
    public void explosion(EntityExplodeEvent e){
    
    List<Block> blocks = e.blockList();
    
    for (Block b : blocks){
    b.getDrops().clear();
    }
    
    
    }
     
Thread Status:
Not open for further replies.

Share This Page