Prevent trap if townBlocks is undefined in towny town file

This commit is contained in:
Mike Primm 2011-09-02 09:19:27 -05:00
parent fba69e3d19
commit a476b66c2f

View File

@ -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<int[]> nodevals = new LinkedList<int[]>();