mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +01:00
Added more aggressive TNT flag check.
This commit is contained in:
parent
44b98165ba
commit
276d42561e
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user