diff --git a/src/com/cnaude/chairs/ChairBlock.java b/src/com/cnaude/chairs/ChairBlock.java index 4f6fca2..6dab811 100644 --- a/src/com/cnaude/chairs/ChairBlock.java +++ b/src/com/cnaude/chairs/ChairBlock.java @@ -13,12 +13,10 @@ import org.bukkit.Material; public class ChairBlock { private Material mat; private double sitHeight; - private byte data; - public ChairBlock(Material m, double s, String d) { + public ChairBlock(Material m, double s) { mat = m; sitHeight = s; - data = Byte.parseByte(d); } public Material getMat() { @@ -28,8 +26,5 @@ public class ChairBlock { public double getSitHeight() { return sitHeight; } - - public byte getDamage() { - return data; - } + } diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/Chairs.java index 1cc3739..2bd98ee 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/Chairs.java @@ -171,24 +171,16 @@ public class Chairs extends JavaPlugin { for (String s : getConfig().getStringList("allowed-blocks")) { String type; double sh = 0.7; - String d = "0"; - if (s.contains(":")) { - String tmp[] = s.split(":",3); - type = tmp[0]; - if (!tmp[1].isEmpty()) { - sh = Double.parseDouble(tmp[1]); - } - if (tmp.length == 3) { - d = tmp[2]; - } - } else { - type = s; + String tmp[] = s.split("[:]"); + type = tmp[0]; + if (tmp.length == 2) { + sh = Double.parseDouble(tmp[1]); } try { Material mat = Material.matchMaterial(type); if (mat != null) { - logInfo("Allowed block: " + mat.toString() + " => " + sh + " => " + d); - allowedBlocks.add(new ChairBlock(mat,sh,d)); + logInfo("Allowed block: " + mat.toString() + " => " + sh); + allowedBlocks.add(new ChairBlock(mat,sh)); } else { logError("Invalid block: " + type); }