Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public void onEntityExplode(EntityExplodeEvent event) {
  2.     Entity e = event.getEntity();
  3.     Location eloc = event.getLocation();
  4.     if(e instanceof TNTPrimed && MAUtils.inRegion(eloc)) {
  5.         //Not dropping anything so we dont duplicate items.
  6.         event.setYield(0)
  7.         //Iterate through blocks
  8.         for(Block b : event.getBlockList()) {
  9.             if(ArenaManager.blockSet.contains(b) {
  10.             b.getWorld().dropItemNaturally(b.getLocation(),new ItemStack(b.getTypeId())
  11.             }
  12.        }
  13.    }
  14. }