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.
This commit is contained in:
graywolf336 2014-05-01 17:39:48 -05:00
parent 7e3956dee5
commit 084e8bea01

View File

@ -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);
}
}