missed bukkit load world handler

This commit is contained in:
walterhiggins 2015-01-25 13:10:12 +00:00
parent e778920937
commit 1dabf3d25d
1 changed files with 8 additions and 2 deletions

View File

@ -506,10 +506,16 @@ function atAddTask( timeMins, callback, world, repeat){
atTasks[worldName][timeMins].push({callback: callback, repeat: repeat});
}
var atMonitors = [];
events.loadWorld(function(evt){
function onLoadStartMonitor(evt){
var monitor = setInterval( atMonitorFactory(evt.world), 900);
atMonitors.push( monitor );
});
}
if (__plugin.canary){
events.loadWorld( onLoadStartMonitor );
}
if (__plugin.bukkit){
events.worldLoad( onLoadStartMonitor );
}
addUnloadHandler(function(){
_foreach(atMonitors, function(atInterval){