Added more aggressive TNT flag check.

This commit is contained in:
sk89q 2011-06-26 00:47:58 -07:00
parent 44b98165ba
commit 276d42561e

View File

@ -478,6 +478,20 @@ public void onEntityExplode(EntityExplodeEvent event) {
}
}
}
if (wcfg.useRegions) {
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
// Whoo, for each block
for (Block block : event.blockList()) {
Vector pt = toVector(block);
if (!mgr.getApplicableRegions(pt).allows(DefaultFlag.TNT)) {
event.setCancelled(true);
return;
}
}
}
}
/**