Fixed jsontimer-interval config not being used.

Change JsonTimerTask.java to use jsontimer-interval+10 to allow a buffer for late/delayed client requests(to prevent updated tiles info to be missing)
This commit is contained in:
Jason Booth 2011-02-17 10:05:07 -06:00
parent 77d9a88868
commit 3916c363ae
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ public class DynmapPlugin extends JavaPlugin {
if(configuration.getBoolean("jsonfile", false)) {
jsonConfig();
int jsonInterval = configuration.getInt("jsonfile", 1) * 1000;
int jsonInterval = configuration.getInt("jsonfile-interval", 1) * 1000;
timer = new Timer();
timer.scheduleAtFixedRate(new JsonTimerTask(this, configuration), jsonInterval, jsonInterval);
}

View File

@ -52,7 +52,7 @@ class JsonTimerTask extends TimerTask
update.players[i] = new Client.Player(p.getName(), pl.getWorld().getName(), pl.getX(), pl.getY(), pl.getZ());
}
update.updates = mapManager.getWorldUpdates(world.getName(), current - 10L);
update.updates = mapManager.getWorldUpdates(world.getName(), current - (configuration.getInt("jsonfile-interval", 1) + 10));
File webpath = new File(this.configuration.getString("webpath", "web"), "dynmap_"+world.getName()+".json");
File outputFile;