Try to lower the amount of time spent on each move event as mentioned in

issue #26
This commit is contained in:
graywolf336
2014-05-08 19:30:20 -05:00
parent 0bb679329d
commit 3e54d79dd3
10 changed files with 38 additions and 40 deletions

View File

@ -742,7 +742,7 @@ public class JailIO {
try {
if(con == null) this.prepareStorage(false);
for(Prisoner p : j.getPrisonersNotInCells()) {
for(Prisoner p : j.getPrisonersNotInCells().values()) {
PreparedStatement pPS = con.prepareStatement("REPLACE INTO `" + prefix + "prisoners` (`uuid`, `name`, `jail`, `cell`, `muted`, `time`,"
+ "`offlinePending`, `toBeTransferred`, `jailer`, `reason`, `inventory`, `armor`, `previousLocation`, `previousGameMode`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
pPS.setString(1, p.getUUID().toString());
@ -848,7 +848,7 @@ public class JailIO {
//Null all the prisoners out before we save them again, this way no prisoners are left behind
flat.set(node + "prisoners", null);
for(Prisoner p : j.getPrisonersNotInCells()) {
for(Prisoner p : j.getPrisonersNotInCells().values()) {
String pNode = node + "prisoners." + p.getUUID().toString() + ".";
flat.set(pNode + "name", p.getLastKnownName());
flat.set(pNode + "muted", p.isMuted());