mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-12 06:08:07 +02:00
Fix handling of non-standard town_block_size values
This commit is contained in:
parent
0c292dde12
commit
cfc758fe7d
@ -32,7 +32,12 @@ public class TownyConfigHandler {
|
|||||||
}
|
}
|
||||||
Configuration tcfg = new Configuration(cfgfile);
|
Configuration tcfg = new Configuration(cfgfile);
|
||||||
tcfg.load();
|
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
|
* Get map of attributes for given world
|
||||||
|
Loading…
Reference in New Issue
Block a user