Fixed some derpy fire handling.

This commit is contained in:
Wizjany 2011-05-16 16:27:17 -04:00
parent 33e0750959
commit f3ec873ac2

View File

@ -293,7 +293,7 @@ public void onBlockIgnite(BlockIgniteEvent event) {
return;
}
}
if (wcfg.useRegions) {
Vector pt = toVector(block);
Player player = event.getPlayer();
@ -316,7 +316,8 @@ public void onBlockIgnite(BlockIgniteEvent event) {
}
}
if (wcfg.highFreqFlags && isFireSpread && set.allows(DefaultFlag.FIRE_SPREAD)) {
if (wcfg.highFreqFlags && isFireSpread
&& !set.allows(DefaultFlag.FIRE_SPREAD)) {
event.setCancelled(true);
return;
}
@ -363,6 +364,19 @@ public void onBlockBurn(BlockBurnEvent event) {
return;
}
}
if (wcfg.useRegions) {
Block block = event.getBlock();
Vector pt = toVector(block);
RegionManager mgr = plugin.getGlobalRegionManager().get(block.getWorld());
ApplicableRegionSet set = mgr.getApplicableRegions(pt);
if (!set.allows(DefaultFlag.FIRE_SPREAD)) {
event.setCancelled(true);
return;
}
}
}
/**