From dcdcdd88aa736910e06c642ef99187e5e2fd142a Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 2 Sep 2011 22:19:27 +0800 Subject: [PATCH] Prevent trap if townBlocks is undefined in towny town file --- src/main/java/org/dynmap/regions/TownyConfigHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/dynmap/regions/TownyConfigHandler.java b/src/main/java/org/dynmap/regions/TownyConfigHandler.java index 195a26af..e6aeb9a1 100644 --- a/src/main/java/org/dynmap/regions/TownyConfigHandler.java +++ b/src/main/java/org/dynmap/regions/TownyConfigHandler.java @@ -119,6 +119,8 @@ public class TownyConfigHandler { } /* Get block list */ String blocks = p.getProperty("townBlocks"); + if(blocks == null) /* Skip if no blocks */ + return null; String[] nodes = blocks.split(";"); /* Split into list */ TileFlags blks = new TileFlags(); LinkedList nodevals = new LinkedList();