Skip to content

Commit

Permalink
Fix handling of non-standard town_block_size values
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeprimm authored and FrozenCow committed Aug 28, 2011
1 parent 4c51080 commit 7d1ab18
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/dynmap/regions/TownyConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ public TownyConfigHandler(ConfigurationNode cfg) {
}
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
Expand Down

0 comments on commit 7d1ab18

Please sign in to comment.