Update for new API listener

This commit is contained in:
Mike Primm 2013-03-20 23:59:50 -05:00
parent 0d25fd2edc
commit 3ac67ce2c5
1 changed files with 8 additions and 2 deletions

View File

@ -68,6 +68,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffectType;
import org.dynmap.DynmapAPI;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapCommonAPIListener;
import org.dynmap.DynmapCore;
import org.dynmap.DynmapLocation;
import org.dynmap.DynmapWebChatEvent;
@ -792,19 +793,24 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
BukkitWorld w = getWorld(world);
if(core.processWorldLoad(w)) /* Have core process load first - fire event listeners if good load after */
core.listenerManager.processWorldEvent(EventType.WORLD_LOAD, w);
}
}
/* Register our update trigger events */
registerEvents();
/* Submit metrics to mcstats.org */
initMetrics();
/* Core is ready - notify API availability */
DynmapCommonAPIListener.apiInitialized(this);
Log.info("Enabled");
}
@Override
public void onDisable() {
/* Core is being disabled - notify API disable */
DynmapCommonAPIListener.apiTerminated();
if (metrics != null) {
metrics = null;
}