If we have converted data, save everything after JailIO is loaded.
This might solve #26 but I'm not closing it yet as this is untested.
This commit is contained in:
@ -51,8 +51,8 @@ public class JailMain extends JavaPlugin {
|
||||
//Try to load the old stuff before we load anything, esp the storage stuff
|
||||
LegacyManager lm = new LegacyManager(this);
|
||||
if(lm.doWeNeedToConvert()) {
|
||||
boolean converted = lm.convertOldData();
|
||||
if(!converted) getLogger().severe("We was unable to convert some, or all, of the old data.");
|
||||
lm.convertOldData();
|
||||
if(!lm.wasAnythingConverted()) getLogger().severe("We was unable to convert some, or all, of the old data.");
|
||||
}
|
||||
|
||||
io = new JailIO(this);
|
||||
@ -67,6 +67,11 @@ public class JailMain extends JavaPlugin {
|
||||
|
||||
io.loadJails();
|
||||
|
||||
//If we converted something, let's save EVERYTHING including the cells
|
||||
if(lm.wasAnythingConverted()) {
|
||||
io.saveEverything();
|
||||
}
|
||||
|
||||
cmdHand = new CommandHandler(this);
|
||||
jh = new JailHandler(this);
|
||||
pm = new PrisonerManager(this);
|
||||
|
Reference in New Issue
Block a user