mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
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:
parent
77d9a88868
commit
3916c363ae
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user