Merge remote branch 'origin/master'

This commit is contained in:
Mike Primm 2011-08-28 18:28:13 -05:00
commit f20c4a25a9
5 changed files with 21 additions and 6 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.dynmap</groupId>
<artifactId>dynmap</artifactId>
<version>0.21</version>
<version>0.22</version>
<name>dynmap</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
name: dynmap
main: org.dynmap.DynmapPlugin
version: "0.21"
version: "0.22"
authors: [FrozenCow, mikeprimm, zeeZ]
softdepend: [Permissions]
commands: