mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-29 22:27:27 +02:00
Fix marker initialization
This commit is contained in:
parent
7c0b515272
commit
3727fb622b
@ -508,6 +508,10 @@ public class DynmapCore implements DynmapCommonAPI {
|
|||||||
mapManager = new MapManager(this, configuration);
|
mapManager = new MapManager(this, configuration);
|
||||||
mapManager.startRendering();
|
mapManager.startRendering();
|
||||||
|
|
||||||
|
if (markerapi != null) {
|
||||||
|
MarkerAPIImpl.completeInitializeMarkerAPI(markerapi);
|
||||||
|
}
|
||||||
|
|
||||||
playerfacemgr = new PlayerFaces(this);
|
playerfacemgr = new PlayerFaces(this);
|
||||||
|
|
||||||
updateConfigHashcode(); /* Initialize/update config hashcode */
|
updateConfigHashcode(); /* Initialize/update config hashcode */
|
||||||
|
@ -395,6 +395,14 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
|||||||
Log.severe("Error creating markers directory - " + api.markerdir.getPath());
|
Log.severe("Error creating markers directory - " + api.markerdir.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return api;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Singleton initializer complete (after rendder pool available
|
||||||
|
* @param core - core object
|
||||||
|
* @return API object
|
||||||
|
*/
|
||||||
|
public static void completeInitializeMarkerAPI(MarkerAPIImpl api) {
|
||||||
MapManager.scheduleDelayedJob(new Runnable() {
|
MapManager.scheduleDelayedJob(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
/* Now publish marker files to the tiles directory */
|
/* Now publish marker files to the tiles directory */
|
||||||
@ -404,13 +412,13 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
|||||||
/* Freshen files */
|
/* Freshen files */
|
||||||
api.freshenMarkerFiles();
|
api.freshenMarkerFiles();
|
||||||
/* Add listener so we update marker files for other worlds as they become active */
|
/* Add listener so we update marker files for other worlds as they become active */
|
||||||
core.events.addListener("worldactivated", api);
|
api.core.events.addListener("worldactivated", api);
|
||||||
|
|
||||||
api.scheduleWriteJob(); /* Start write job */
|
api.scheduleWriteJob(); /* Start write job */
|
||||||
|
|
||||||
|
Log.info("Finish marker initialization");
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
return api;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void scheduleWriteJob() {
|
public void scheduleWriteJob() {
|
||||||
|
Loading…
Reference in New Issue
Block a user