diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java index a672be22f..6408824ed 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java @@ -56,6 +56,7 @@ public abstract class LocalConfiguration { public boolean profile = false; public boolean traceUnflushedSessions = false; public Set disallowedBlocks = new HashSet<>(); + public Set defaultAllowedDataCycleBlocks = new HashSet<>(); protected BlockMask disallowedBlocksMask; public int defaultChangeLimit = -1; public int maxChangeLimit = -1; @@ -168,6 +169,10 @@ public abstract class LocalConfiguration { return blockTypes.stream().filter(Objects::nonNull).map(BlockType::getId).toArray(String[]::new); } + protected String[] getDefaultAllowedDataCycleBlocks() { + return new String[0]; + } + /** * Load the configuration. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java index 82130682b..91dfabb1a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java @@ -91,7 +91,7 @@ public class PropertiesConfiguration extends LocalConfiguration { disallowedBlocks = getStringSet("disallowed-blocks", getDefaultDisallowedBlocks()); disallowedBlocksMask = null; allowedDataCycleBlocks = - new HashSet<>(getStringSet("limits.allowed-data-cycle-blocks", null)); + new HashSet<>(getStringSet("limits.allowed-data-cycle-blocks", getDefaultAllowedDataCycleBlocks())); defaultChangeLimit = getInt("default-max-changed-blocks", defaultChangeLimit); maxChangeLimit = getInt("max-changed-blocks", maxChangeLimit); defaultVerticalHeight = getInt("default-vertical-height", defaultVerticalHeight);