mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
Merge pull request #2498 from stormboomer/v3.0
Added functionality for restarting the scheduled job that stores markers
This commit is contained in:
commit
881b7dfefd
@ -159,7 +159,9 @@ public class DynmapCore implements DynmapCommonAPI {
|
||||
server = null;
|
||||
markerapi = null;
|
||||
}
|
||||
|
||||
public void restartMarkerSaveJob(){
|
||||
this.markerapi.scheduleWriteJob();
|
||||
}
|
||||
// Set plugin jar file
|
||||
public void setPluginJarFile(File f) {
|
||||
jarfile = f;
|
||||
|
@ -407,7 +407,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
return api;
|
||||
}
|
||||
|
||||
private void scheduleWriteJob() {
|
||||
public void scheduleWriteJob() {
|
||||
core.getServer().scheduleServerTask(new DoFileWrites(), 20);
|
||||
}
|
||||
|
||||
|
@ -796,6 +796,12 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if(core != null){
|
||||
if(core.getMarkerAPI() != null){
|
||||
getLogger().info("Starting Scheduled Write Job (markerAPI).");
|
||||
core.restartMarkerSaveJob();
|
||||
}
|
||||
}
|
||||
if (helper == null) {
|
||||
Log.info("Dynmap is disabled (unsupported platform)");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user