From 3acc82e97b8750c277cd8ccd431fc4ea4c11307e Mon Sep 17 00:00:00 2001 From: wizjany Date: Tue, 26 Nov 2013 10:36:39 -0500 Subject: [PATCH] Removed the allow-extra-data-values option. This reverts parts of e477141. Data values could never go past 15 anyway, making the option pointless and misleading. --- src/main/java/com/sk89q/worldedit/LocalConfiguration.java | 1 - src/main/java/com/sk89q/worldedit/WorldEdit.java | 2 +- .../java/com/sk89q/worldedit/util/PropertiesConfiguration.java | 1 - src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java | 3 --- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/LocalConfiguration.java b/src/main/java/com/sk89q/worldedit/LocalConfiguration.java index 916826646..ae885d5bb 100644 --- a/src/main/java/com/sk89q/worldedit/LocalConfiguration.java +++ b/src/main/java/com/sk89q/worldedit/LocalConfiguration.java @@ -110,7 +110,6 @@ public abstract class LocalConfiguration { public boolean showFirstUseVersion = true; public int butcherDefaultRadius = -1; public int butcherMaxRadius = -1; - public boolean allowExtraDataValues = false; public boolean allowSymlinks = false; /** diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index ecfa8cb7a..2e62dd0db 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -436,7 +436,7 @@ public class WorldEdit { // Parse the block data (optional) try { data = (typeAndData.length > 1 && typeAndData[1].length() > 0) ? Integer.parseInt(typeAndData[1]) : (allowNoData ? -1 : 0); - if ((data > 15 && !config.allowExtraDataValues) || (data < 0 && !(allAllowed && data == -1))) { + if (data > 15 || (data < 0 && !(allAllowed && data == -1))) { data = 0; } } catch (NumberFormatException e) { diff --git a/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java b/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java index 491b57d1a..e7b7bbcbe 100644 --- a/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java +++ b/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java @@ -106,7 +106,6 @@ public class PropertiesConfiguration extends LocalConfiguration { scriptsDir = getString("craftscript-dir", scriptsDir); butcherDefaultRadius = getInt("butcher-default-radius", butcherDefaultRadius); butcherMaxRadius = getInt("butcher-max-radius", butcherMaxRadius); - allowExtraDataValues = getBool("allow-extra-data-values", allowExtraDataValues); allowSymlinks = getBool("allow-symbolic-links", allowSymlinks); LocalSession.MAX_HISTORY_SIZE = Math.max(15, getInt("history-size", 15)); diff --git a/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java b/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java index c616f9754..bf0431c94 100644 --- a/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java +++ b/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java @@ -79,9 +79,6 @@ public class YAMLConfiguration extends LocalConfiguration { disallowedBlocks = new HashSet(config.getIntList("limits.disallowed-blocks", null)); allowedDataCycleBlocks = new HashSet(config.getIntList("limits.allowed-data-cycle-blocks", null)); - allowExtraDataValues = config.getBoolean("limits.allow-extra-data-values", false); - - registerHelp = config.getBoolean("register-help", true); logCommands = config.getBoolean("logging.log-commands", logCommands); logFile = config.getString("logging.file", logFile);