Permalink
Browse files

Update for new API listener

  • Loading branch information...
1 parent 0d25fd2 commit 3ac67ce2c58f5cd26d9ff5e511456286b5d42121 @mikeprimm mikeprimm committed Mar 21, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/main/java/org/dynmap/bukkit/DynmapPlugin.java
@@ -68,6 +68,7 @@
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 @@ private void doEnable() {
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;
}

0 comments on commit 3ac67ce

Please sign in to comment.