diff --git a/pom.xml b/pom.xml index d83b6e07..b7ce19e0 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.dynmap dynmap - 0.21 + 0.22 dynmap UTF-8 diff --git a/src/main/java/org/dynmap/regions/TownyConfigHandler.java b/src/main/java/org/dynmap/regions/TownyConfigHandler.java index 27813891..141b117c 100644 --- a/src/main/java/org/dynmap/regions/TownyConfigHandler.java +++ b/src/main/java/org/dynmap/regions/TownyConfigHandler.java @@ -32,7 +32,12 @@ public class TownyConfigHandler { } Configuration tcfg = new Configuration(cfgfile); tcfg.load(); - townblocksize = tcfg.getInt("town_block_size", 16); /* Get block size */ + String tbsize = tcfg.getNode("town").getString("town_block_size", "16"); + try { + townblocksize = Integer.valueOf(tbsize); + } catch (NumberFormatException nfx) { + townblocksize = 16; + } } /** * Get map of attributes for given world @@ -124,8 +129,13 @@ public class TownyConfigHandler { n = n.substring(idx+1); /* Process remainder as coordinate */ } if(!worldmatch) continue; + + int bidx = n.indexOf(']'); + if(bidx >= 0) { /* If 0.75 block type present, skip it (we don't care yet) */ + n = n.substring(bidx+1); + } String[] v = n.split(","); - if(v.length == 2) { + if(v.length >= 2) { /* Price in 0.75 is third - don't care :) */ try { int[] vv = new int[] { Integer.valueOf(v[0]), Integer.valueOf(v[1]) }; blks.setFlag(vv[0], vv[1], true); @@ -134,6 +144,11 @@ public class TownyConfigHandler { Log.severe("Error parsing block list in Towny - " + townfile.getPath()); return null; } + } else if(n.startsWith("|")){ /* End of list? */ + + } else { + Log.severe("Invalid block list format in Towny - " + townfile.getPath()); + return null; } } /* If nothing in this world, skip */ diff --git a/src/main/resources/lightings.txt b/src/main/resources/lightings.txt index 0219d074..a5f6c97e 100644 --- a/src/main/resources/lightings.txt +++ b/src/main/resources/lightings.txt @@ -1,4 +1,4 @@ -version: 0.21 +version: 0.22 # # This file contains default standard lighting profiles. The contents of this file CAN need to be replaced and updated # during upgrades, so new or updated lighting definitions should be done in the custom-lightings.txt file diff --git a/src/main/resources/perspectives.txt b/src/main/resources/perspectives.txt index 75ae73a5..0fc3ca84 100644 --- a/src/main/resources/perspectives.txt +++ b/src/main/resources/perspectives.txt @@ -1,4 +1,4 @@ -version: 0.21 +version: 0.22 # # This file contains default standard perspective definitions. The contents of this file CAN need to be replaced and updated # during upgrades, so new or updated perspective definitions should be done in the custom-perspectives.txt file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a2aca214..d3e825c1 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: dynmap main: org.dynmap.DynmapPlugin -version: "0.21" +version: "0.22" authors: [FrozenCow, mikeprimm, zeeZ] softdepend: [Permissions] commands: