Properly output how many cells were loaded, hopefully this has something

to do with #26 displaying incorrect information.
This commit is contained in:
graywolf336
2014-05-02 01:35:04 -05:00
parent b8dc15decb
commit b3033913c7
2 changed files with 18 additions and 6 deletions

View File

@ -378,7 +378,6 @@ public class JailIO {
//that doesn't exist anymore
List<Integer> cellsToRemove = new LinkedList<Integer>();
int cs = 0;
try {
if(con == null) this.prepareStorage(false);
PreparedStatement ps = con.prepareStatement("SELECT * FROM " + prefix + "cells");
@ -405,7 +404,6 @@ public class JailIO {
j.addCell(c, false);
cs++;
}else {
cellsToRemove.add(set.getInt("cellid"));
}
@ -444,8 +442,6 @@ public class JailIO {
}
}
pl.getLogger().info("Loaded " + cs + (cs == 1 ? " cell." : " cells."));
//This list contains a string which refers to the name of the prisoner in sql
//this list only gets populated if there are prisoners which reference a jail
//that doesn't exist anymore
@ -538,6 +534,9 @@ public class JailIO {
int js = pl.getJailManager().getJails().size();
pl.getLogger().info("Loaded " + js + (js == 1 ? " jail." : " jails."));
int cs = pl.getJailManager().getAllCells().size();
pl.getLogger().info("Loaded " + cs + (cs == 1 ? " cell." : " cells."));
int ps = pl.getJailManager().getAllPrisoners().size();
pl.getLogger().info("Loaded " + ps + (ps == 1 ? " prisoner." : " prisoners."));
}