mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-25 12:05:14 +01:00
flags: added copper-fade flag to prevent oxidizing copper
This commit is contained in:
parent
8c8a8092b5
commit
fd1cb1e4bd
@ -281,6 +281,7 @@ public void loadConfiguration() {
|
||||
disableCropGrowth = getBoolean("dynamics.disable-crop-growth", false);
|
||||
disableSoilDehydration = getBoolean("dynamics.disable-soil-dehydration", false);
|
||||
disableCoralBlockFade = getBoolean("dynamics.disable-coral-block-fade", false);
|
||||
disableCopperBlockFade = getBoolean("dynamics.disable-copper-block-fade", false);
|
||||
allowedSnowFallOver = new HashSet<>(convertLegacyBlocks(getStringList("dynamics.snow-fall-blocks", null)));
|
||||
|
||||
useRegions = getBoolean("regions.enable", true);
|
||||
|
@ -697,6 +697,16 @@ public void onBlockFade(BlockFadeEvent event) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
} else if (Materials.isUnwaxedCopper(event.getBlock().getType())) {
|
||||
if (wcfg.disableCopperBlockFade) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (wcfg.useRegions && !StateFlag.test(WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
|
||||
.queryState(BukkitAdapter.adapt(event.getBlock().getLocation()), (RegionAssociable) null, Flags.COPPER_FADE))) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,6 +165,7 @@ public abstract class WorldConfiguration {
|
||||
public boolean disableSnowmanTrails;
|
||||
public boolean disableSoilDehydration;
|
||||
public boolean disableCoralBlockFade;
|
||||
public boolean disableCopperBlockFade;
|
||||
public Set<String> allowedSnowFallOver;
|
||||
public boolean regionInvinciblityRemovesMobs;
|
||||
public boolean regionCancelEmptyChatEvents;
|
||||
|
@ -125,6 +125,7 @@ public final class Flags {
|
||||
public static final StateFlag CROP_GROWTH = register(new StateFlag("crop-growth", true));
|
||||
public static final StateFlag SOIL_DRY = register(new StateFlag("soil-dry", true));
|
||||
public static final StateFlag CORAL_FADE = register(new StateFlag("coral-fade", true));
|
||||
public static final StateFlag COPPER_FADE = register(new StateFlag("copper-fade", true));
|
||||
public static final StateFlag WATER_FLOW = register(new StateFlag("water-flow", true));
|
||||
public static final StateFlag LAVA_FLOW = register(new StateFlag("lava-flow", true));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user