mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-28 02:52:52 +01:00
Added config option and flag to prevent soil from drying naturally.
This commit is contained in:
parent
458cf64501
commit
ac525958c5
@ -162,12 +162,14 @@ public class WorldConfiguration {
|
|||||||
public boolean disableVineGrowth;
|
public boolean disableVineGrowth;
|
||||||
public boolean disableEndermanGriefing;
|
public boolean disableEndermanGriefing;
|
||||||
public boolean disableSnowmanTrails;
|
public boolean disableSnowmanTrails;
|
||||||
|
public boolean disableSoilDehydration;
|
||||||
public boolean regionInvinciblityRemovesMobs;
|
public boolean regionInvinciblityRemovesMobs;
|
||||||
public boolean disableDeathMessages;
|
public boolean disableDeathMessages;
|
||||||
public boolean disableObsidianGenerators;
|
public boolean disableObsidianGenerators;
|
||||||
|
|
||||||
private Map<String, Integer> maxRegionCounts;
|
private Map<String, Integer> maxRegionCounts;
|
||||||
|
|
||||||
|
|
||||||
/* Configuration data end */
|
/* Configuration data end */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -400,6 +402,7 @@ private void loadConfiguration() {
|
|||||||
disableGrassGrowth = getBoolean("dynamics.disable-grass-growth", false);
|
disableGrassGrowth = getBoolean("dynamics.disable-grass-growth", false);
|
||||||
disableMyceliumSpread = getBoolean("dynamics.disable-mycelium-spread", false);
|
disableMyceliumSpread = getBoolean("dynamics.disable-mycelium-spread", false);
|
||||||
disableVineGrowth = getBoolean("dynamics.disable-vine-growth", false);
|
disableVineGrowth = getBoolean("dynamics.disable-vine-growth", false);
|
||||||
|
disableSoilDehydration = getBoolean("dynamics.disable-soil-dehydration", false);
|
||||||
|
|
||||||
useRegions = getBoolean("regions.enable", true);
|
useRegions = getBoolean("regions.enable", true);
|
||||||
regionInvinciblityRemovesMobs = getBoolean("regions.invincibility-removes-mobs", false);
|
regionInvinciblityRemovesMobs = getBoolean("regions.invincibility-removes-mobs", false);
|
||||||
|
@ -833,6 +833,18 @@ public void onBlockFade(BlockFadeEvent event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == BlockID.SOIL) {
|
||||||
|
if (wcfg.disableSoilDehydration) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (wcfg.useRegions && !plugin.getGlobalRegionManager().allows(
|
||||||
|
DefaultFlag.SOIL_DRY, event.getBlock().getLocation())) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -60,6 +60,7 @@ public final class DefaultFlag {
|
|||||||
public static final StateFlag GRASS_SPREAD = new StateFlag("grass-growth", true);
|
public static final StateFlag GRASS_SPREAD = new StateFlag("grass-growth", true);
|
||||||
public static final StateFlag MYCELIUM_SPREAD = new StateFlag("mycelium-spread", true);
|
public static final StateFlag MYCELIUM_SPREAD = new StateFlag("mycelium-spread", true);
|
||||||
public static final StateFlag VINE_GROWTH = new StateFlag("vine-growth", true);
|
public static final StateFlag VINE_GROWTH = new StateFlag("vine-growth", true);
|
||||||
|
public static final StateFlag SOIL_DRY = new StateFlag("soil-dry", true);
|
||||||
public static final StateFlag ENDER_BUILD = new StateFlag("enderman-grief", true);
|
public static final StateFlag ENDER_BUILD = new StateFlag("enderman-grief", true);
|
||||||
public static final StateFlag INVINCIBILITY = new StateFlag("invincible", false, RegionGroup.ALL);
|
public static final StateFlag INVINCIBILITY = new StateFlag("invincible", false, RegionGroup.ALL);
|
||||||
public static final StateFlag EXP_DROPS = new StateFlag("exp-drops", true, RegionGroup.ALL);
|
public static final StateFlag EXP_DROPS = new StateFlag("exp-drops", true, RegionGroup.ALL);
|
||||||
@ -106,7 +107,7 @@ public final class DefaultFlag {
|
|||||||
ENTITY_ITEM_FRAME_DESTROY, ITEM_DROP, /*MAX_PLAYERS, MAX_PLAYERS_MESSAGE,*/
|
ENTITY_ITEM_FRAME_DESTROY, ITEM_DROP, /*MAX_PLAYERS, MAX_PLAYERS_MESSAGE,*/
|
||||||
HEAL_AMOUNT, HEAL_DELAY, MIN_HEAL, MAX_HEAL,
|
HEAL_AMOUNT, HEAL_DELAY, MIN_HEAL, MAX_HEAL,
|
||||||
FEED_DELAY, FEED_AMOUNT, MIN_FOOD, MAX_FOOD,
|
FEED_DELAY, FEED_AMOUNT, MIN_FOOD, MAX_FOOD,
|
||||||
SNOW_FALL, SNOW_MELT, ICE_FORM, ICE_MELT, GAME_MODE,
|
SNOW_FALL, SNOW_MELT, ICE_FORM, ICE_MELT, SOIL_DRY, GAME_MODE,
|
||||||
MUSHROOMS, LEAF_DECAY, GRASS_SPREAD, MYCELIUM_SPREAD, VINE_GROWTH,
|
MUSHROOMS, LEAF_DECAY, GRASS_SPREAD, MYCELIUM_SPREAD, VINE_GROWTH,
|
||||||
SEND_CHAT, RECEIVE_CHAT, FIRE_SPREAD, LAVA_FIRE, LAVA_FLOW, WATER_FLOW,
|
SEND_CHAT, RECEIVE_CHAT, FIRE_SPREAD, LAVA_FIRE, LAVA_FLOW, WATER_FLOW,
|
||||||
TELE_LOC, SPAWN_LOC, POTION_SPLASH,
|
TELE_LOC, SPAWN_LOC, POTION_SPLASH,
|
||||||
|
Loading…
Reference in New Issue
Block a user