From 084e8bea0184926602ae9acccc518a30219421ee Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Thu, 1 May 2014 17:39:48 -0500 Subject: [PATCH] Warn when a cell doesn't have a teleport location or cell. Also, don't double store a prisoner when they get put in a cell from a jail after being converted. --- .../java/com/graywolf336/jail/legacy/OldInputOutput.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/graywolf336/jail/legacy/OldInputOutput.java b/src/main/java/com/graywolf336/jail/legacy/OldInputOutput.java index 7aafc8e..48dce58 100644 --- a/src/main/java/com/graywolf336/jail/legacy/OldInputOutput.java +++ b/src/main/java/com/graywolf336/jail/legacy/OldInputOutput.java @@ -170,11 +170,15 @@ public class OldInputOutput { if(!teleport.isEmpty()) { String[] l = teleport.split(","); c.setTeleport(new SimpleLocation(j.getWorldName(), l[0], l[1], l[2])); + }else { + pl.getLogger().warning("Cell " + c.getName() + " in " + j.getName() + " has an empty teleport spot, might be buggy."); } if(!chest.isEmpty()) { String[] ch = chest.split(","); c.setChestLocation(new Location(j.getWorld(), Double.valueOf(ch[0]), Double.valueOf(ch[1]), Double.valueOf(ch[2]))); + }else { + pl.getLogger().warning("Cell " + c.getName() + " in " + j.getName() + " has no chest."); } if(!sign.isEmpty()) { @@ -190,6 +194,7 @@ public class OldInputOutput { Prisoner p = j.getPrisonerByLastKnownName(name); if(p != null) { + j.removePrisoner(p); c.setPrisoner(p); } }