mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +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;
|
server = null;
|
||||||
markerapi = null;
|
markerapi = null;
|
||||||
}
|
}
|
||||||
|
public void restartMarkerSaveJob(){
|
||||||
|
this.markerapi.scheduleWriteJob();
|
||||||
|
}
|
||||||
// Set plugin jar file
|
// Set plugin jar file
|
||||||
public void setPluginJarFile(File f) {
|
public void setPluginJarFile(File f) {
|
||||||
jarfile = f;
|
jarfile = f;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,6 +796,12 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
if(core != null){
|
||||||
|
if(core.getMarkerAPI() != null){
|
||||||
|
getLogger().info("Starting Scheduled Write Job (markerAPI).");
|
||||||
|
core.restartMarkerSaveJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (helper == null) {
|
if (helper == null) {
|
||||||
Log.info("Dynmap is disabled (unsupported platform)");
|
Log.info("Dynmap is disabled (unsupported platform)");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user