From bfa7ac6a48e951eac63d6cfdbf9e21f8faa976e1 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 16 Jan 2011 13:36:36 -0800 Subject: [PATCH] Fixed incorrect loading of disallowed blocks list from the configuration. --- .../worldedit/bukkit/BukkitConfiguration.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/com/sk89q/worldedit/bukkit/BukkitConfiguration.java b/src/com/sk89q/worldedit/bukkit/BukkitConfiguration.java index c80272237..6ffd9006b 100644 --- a/src/com/sk89q/worldedit/bukkit/BukkitConfiguration.java +++ b/src/com/sk89q/worldedit/bukkit/BukkitConfiguration.java @@ -20,6 +20,7 @@ package com.sk89q.worldedit.bukkit; import java.io.IOException; +import java.util.ArrayList; import java.util.HashSet; import java.util.logging.FileHandler; import java.util.logging.Handler; @@ -63,18 +64,9 @@ public class BukkitConfiguration extends LocalConfiguration { useInventoryOverride); maxBrushRadius = config.getInt("limits.max-brush-radius", maxBrushRadius); - // Get disallowed blocks - disallowedBlocks = new HashSet(); - String defdisallowedBlocks = StringUtil.joinString(defaultDisallowedBlocks, ",", 0); - for (String b : config.getString("limits.disallowed-blocks", - defdisallowedBlocks).split(",")) { - try { - disallowedBlocks.add(Integer.parseInt(b)); - } catch (NumberFormatException e) { - } - } + disallowedBlocks = new HashSet(config.getIntList("limits.disallowed-blocks", null)); - String snapshotsDir = config.getString("snapshots.directry", ""); + String snapshotsDir = config.getString("snapshots.directory", ""); if (!snapshotsDir.trim().equals("")) { snapshotRepo = new SnapshotRepository(snapshotsDir); } else {