Added functionality for restarting the scheduled job that stores markers to markers.yml.
This should fix problems with markers not being stored after a dynmap reload, as well as vanishing markers.
This commit is contained in:
parent
eb905dc439
commit
449ceffe1e
3 changed files with 8 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ public class DynmapCore implements DynmapCommonAPI {
|
||||||
public boolean is_reload = false;
|
public boolean is_reload = false;
|
||||||
public static boolean ignore_chunk_loads = false; /* Flag keep us from processing our own chunk loads */
|
public static boolean ignore_chunk_loads = false; /* Flag keep us from processing our own chunk loads */
|
||||||
|
|
||||||
private MarkerAPIImpl markerapi;
|
public MarkerAPIImpl markerapi;
|
||||||
|
|
||||||
private File dataDirectory;
|
private File dataDirectory;
|
||||||
private File tilesDirectory;
|
private File tilesDirectory;
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||||
return api;
|
return api;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleWriteJob() {
|
public void scheduleWriteJob() {
|
||||||
core.getServer().scheduleServerTask(new DoFileWrites(), 20);
|
core.getServer().scheduleServerTask(new DoFileWrites(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -790,6 +790,12 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
if(core != null){
|
||||||
|
if(core.markerapi != null){
|
||||||
|
getLogger().info("Starting Scheduled Write Job (markerAPI).");
|
||||||
|
core.markerapi.scheduleWriteJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (helper == null) {
|
if (helper == null) {
|
||||||
Log.info("Dynmap is disabled (unsupported platform)");
|
Log.info("Dynmap is disabled (unsupported platform)");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue