Handle Towny 0.74.0 configuration format
This commit is contained in:
parent
82e1ea1513
commit
cd6ee570ff
1 changed files with 6 additions and 1 deletions
|
|
@ -32,7 +32,12 @@ public class TownyConfigHandler {
|
||||||
}
|
}
|
||||||
Configuration tcfg = new Configuration(cfgfile);
|
Configuration tcfg = new Configuration(cfgfile);
|
||||||
tcfg.load();
|
tcfg.load();
|
||||||
String tbsize = tcfg.getNode("town").getString("town_block_size", "16");
|
org.bukkit.util.config.ConfigurationNode townnode = tcfg.getNode("town");
|
||||||
|
String tbsize = "16";
|
||||||
|
if(townnode != null)
|
||||||
|
tbsize = townnode.getString("town_block_size", "16");
|
||||||
|
else
|
||||||
|
tbsize = tcfg.getString("town_block_size", "16");
|
||||||
try {
|
try {
|
||||||
townblocksize = Integer.valueOf(tbsize);
|
townblocksize = Integer.valueOf(tbsize);
|
||||||
} catch (NumberFormatException nfx) {
|
} catch (NumberFormatException nfx) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue