mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-24 18:19:03 +01:00
Merge pull request #201 from eric-wieser/patch-1
Did `wcfg.useRegions` really need to be checked twice?
This commit is contained in:
commit
6df9c3660b
@ -518,14 +518,12 @@ public void onEntityExplode(EntityExplodeEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (wcfg.useRegions) {
|
if (wcfg.useRegions) {
|
||||||
if (wcfg.useRegions) {
|
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
||||||
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
|
||||||
|
|
||||||
for (Block block : event.blockList()) {
|
for (Block block : event.blockList()) {
|
||||||
if (!mgr.getApplicableRegions(toVector(block)).allows(DefaultFlag.ENDERDRAGON_BLOCK_DAMAGE)) {
|
if (!mgr.getApplicableRegions(toVector(block)).allows(DefaultFlag.ENDERDRAGON_BLOCK_DAMAGE)) {
|
||||||
event.blockList().clear();
|
event.blockList().clear();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user