debug messages, switched to using an actual boolean for B in config

This commit is contained in:
BuildTools 2016-12-06 19:47:59 -05:00
parent 9e83ab43f5
commit 42a38642c0
2 changed files with 12 additions and 6 deletions

View file

@ -15,6 +15,7 @@ public class ConfigProcess implements Runnable {
} }
static final void addNew(String name, WorldObj newWorld) static final void addNew(String name, WorldObj newWorld)
{ {
Bukkit.getLogger().info("config: addNew(" + name + ")");
config.set(name + ".total", newWorld.total); config.set(name + ".total", newWorld.total);
config.set(name + ".currentRegion.x", newWorld.current[0]); config.set(name + ".currentRegion.x", newWorld.current[0]);
config.set(name + ".currentRegion.z", newWorld.current[1]); config.set(name + ".currentRegion.z", newWorld.current[1]);
@ -22,7 +23,7 @@ public class ConfigProcess implements Runnable {
config.set(name + ".c", 1); config.set(name + ".c", 1);
config.set(name + ".D", 1); config.set(name + ".D", 1);
config.set(name + ".d", 0); config.set(name + ".d", 0);
config.set(name + ".B", 0); config.set(name + ".B", false);
plugin.saveConfig(); plugin.saveConfig();
} }
static final WorldObj getUnfinished(String name) static final WorldObj getUnfinished(String name)
@ -39,7 +40,7 @@ public class ConfigProcess implements Runnable {
config.getInt(name + ".c"), config.getInt(name + ".c"),
config.getInt(name + ".D"), config.getInt(name + ".D"),
config.getInt(name + ".d"), config.getInt(name + ".d"),
config.getInt(name + ".B") == 1 config.getBoolean(name + ".B")
); );
} }
static final boolean crashResume() static final boolean crashResume()
@ -67,7 +68,7 @@ public class ConfigProcess implements Runnable {
config.set(name + ".c", TaskManager.loadProcess.c); config.set(name + ".c", TaskManager.loadProcess.c);
config.set(name + ".D", TaskManager.loadProcess.D); config.set(name + ".D", TaskManager.loadProcess.D);
config.set(name + ".d", TaskManager.loadProcess.d); config.set(name + ".d", TaskManager.loadProcess.d);
config.set(name + ".B", TaskManager.loadProcess.B ? 1 : 0); config.set(name + ".B", TaskManager.loadProcess.B);
plugin.saveConfig(); plugin.saveConfig();
Bukkit.getLogger().info Bukkit.getLogger().info
( (

View file

@ -23,9 +23,14 @@ public class LoadProcess implements Runnable
LoadProcess(String name) //resume from stored LoadProcess(String name) //resume from stored
{ {
Bukkit.getLogger().info("resuming stored world-load process");
WorldObj unfinishedworld = ConfigProcess.getUnfinished(name); WorldObj unfinishedworld = ConfigProcess.getUnfinished(name);
Bukkit.getLogger().info("resuming stored world-load process "
+ unfinishedworld.n + " "
+ unfinishedworld.c + " "
+ unfinishedworld.D + " "
+ unfinishedworld.d + " "
+ unfinishedworld.B
);
world = Bukkit.getWorld(name); world = Bukkit.getWorld(name);
totalRegions = unfinishedworld.total; totalRegions = unfinishedworld.total;