diff --git a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java index dceb8ea1..16bd294f 100644 --- a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java +++ b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java @@ -140,7 +140,7 @@ public class DynmapCore implements DynmapCommonAPI { public boolean is_reload = false; 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 tilesDirectory; diff --git a/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java b/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java index 3eb3692b..d22d7af3 100644 --- a/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java +++ b/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java @@ -407,7 +407,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener { return api; } - private void scheduleWriteJob() { + public void scheduleWriteJob() { core.getServer().scheduleServerTask(new DoFileWrites(), 20); } diff --git a/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java b/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java index 23267bb3..e97356a1 100644 --- a/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java +++ b/spigot/src/main/java/org/dynmap/bukkit/DynmapPlugin.java @@ -790,6 +790,12 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI { @Override public void onEnable() { + if(core != null){ + if(core.markerapi != null){ + getLogger().info("Starting Scheduled Write Job (markerAPI)."); + core.markerapi.scheduleWriteJob(); + } + } if (helper == null) { Log.info("Dynmap is disabled (unsupported platform)"); return;