From 9f9ede433a8ab4c91807b13292b08736b1a06d20 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Thu, 6 Mar 2014 17:09:21 -0600 Subject: [PATCH] Fix a problem with the loading of cells when no signs. --- src/main/java/com/graywolf336/jail/JailIO.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/graywolf336/jail/JailIO.java b/src/main/java/com/graywolf336/jail/JailIO.java index ef20bef..3343f4c 100644 --- a/src/main/java/com/graywolf336/jail/JailIO.java +++ b/src/main/java/com/graywolf336/jail/JailIO.java @@ -389,12 +389,16 @@ public class JailIO { c.setChestLocation(new Location(j.getWorld(), set.getInt("chest.x"), set.getInt("chest.y"), set.getInt("chest.z"))); - String[] signs = set.getString("signs").split(";"); - for(String s : signs) { - String[] co = s.split(","); - c.addSign(new SimpleLocation(co[0], co[1], co[2], co[4])); + String cSigns = set.getString("signs"); + if(!cSigns.isEmpty()) { + String[] signs = cSigns.split(";"); + for(String s : signs) { + String[] co = s.split(","); + c.addSign(new SimpleLocation(co[0], co[1], co[2], co[3])); + } } + j.addCell(c, false); cs++; }else {