Update readme and convert the old positions.

This commit is contained in:
graywolf336
2014-07-14 17:01:34 -05:00
parent 48972e9523
commit 34ebc5bc08
2 changed files with 10 additions and 4 deletions

View File

@ -117,7 +117,8 @@ public class OldInputOutput {
transfer = true;
}
//In the event the jail is null (jail didn't transfer or the prisoner was jailed offline and no jail specified
//In the event the jail is null (jail didn't transfer or the prisoner was jailed offline and no jail specified)
//set their jail to the first one we have
if(j == null) {
j = pl.getJailManager().getJails().iterator().next();
}
@ -126,6 +127,12 @@ public class OldInputOutput {
p.setOfflinePending(set.getBoolean("Offline"));
p.setToBeTransferred(transfer);
String previousLoc = set.getString("PreviousPosition");
if(!previousLoc.isEmpty()) {
String[] l = previousLoc.split(",");
p.setPreviousPosition(new Location(pl.getServer().getWorld(l[0]), Integer.parseInt(l[1]), Integer.parseInt(l[2]), Integer.parseInt(l[3])));
}
j.addPrisoner(p);
//String permissions = set.getString("Permissions"); TODO
}