mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Added a region high frequency flags setting to disable high frequency flags. Enable it if you've got the system resources to support it. This covers the fire spread, lava fire spread, lava flow, and water flow flags.
This commit is contained in:
parent
93d084d5ba
commit
e8fb3e6d24
@ -73,6 +73,7 @@ regions:
|
||||
max-claim-volume: 30000
|
||||
claim-only-inside-existing-regions: off
|
||||
max-region-count-per-player: 7
|
||||
high-frequency-flags: off
|
||||
|
||||
iconomy:
|
||||
enable: on
|
||||
|
@ -87,6 +87,7 @@ public class WorldConfiguration {
|
||||
public boolean disableSuffocationDamage;
|
||||
public boolean teleportOnSuffocation;
|
||||
public boolean useRegions;
|
||||
public boolean highFreqFlags;
|
||||
public int regionWand = 287;
|
||||
public Set<CreatureType> blockCreatureSpawn;
|
||||
public boolean useiConomy;
|
||||
@ -168,6 +169,7 @@ private void loadConfiguration() {
|
||||
teleportOnSuffocation = config.getBoolean("player-damage.teleport-on-suffocation", false);
|
||||
|
||||
useRegions = config.getBoolean("regions.enable", true);
|
||||
highFreqFlags = config.getBoolean("regions.high-frequency-flags", false);
|
||||
regionWand = config.getInt("regions.wand", 287);
|
||||
maxClaimVolume = config.getInt("regions.max-claim-volume", 30000);
|
||||
claimOnlyInsideExistingRegions = config.getBoolean("regions.claim-only-inside-existing-regions", false);
|
||||
|
@ -188,13 +188,15 @@ public void onBlockFromTo(BlockFromToEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isWater && !plugin.getGlobalRegionManager().allows(DefaultFlag.WATER_FLOW,
|
||||
if (wcfg.highFreqFlags && isWater
|
||||
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.WATER_FLOW,
|
||||
blockFrom.getLocation())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isLava && !plugin.getGlobalRegionManager().allows(DefaultFlag.LAVA_FLOW,
|
||||
if (wcfg.highFreqFlags && isLava
|
||||
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.LAVA_FLOW,
|
||||
blockFrom.getLocation())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -276,12 +278,13 @@ public void onBlockIgnite(BlockIgniteEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isFireSpread && set.allows(DefaultFlag.FIRE_SPREAD)) {
|
||||
if (wcfg.highFreqFlags && isFireSpread && set.allows(DefaultFlag.FIRE_SPREAD)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cause == IgniteCause.LAVA && !set.allows(DefaultFlag.LAVA_FIRE)) {
|
||||
if (wcfg.highFreqFlags && cause == IgniteCause.LAVA
|
||||
&& !set.allows(DefaultFlag.LAVA_FIRE)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user