From 9da3180e383470f0fca87178d89814ffe4af1eca Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Tue, 30 Aug 2011 00:28:28 -0500 Subject: [PATCH] Handle Towny 0.74.0 configuration format --- src/main/java/org/dynmap/regions/TownyConfigHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dynmap/regions/TownyConfigHandler.java b/src/main/java/org/dynmap/regions/TownyConfigHandler.java index 141b117c..195a26af 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(); - 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 { townblocksize = Integer.valueOf(tbsize); } catch (NumberFormatException nfx) {