missed bukkit load world handler
This commit is contained in:
parent
e778920937
commit
1dabf3d25d
1 changed files with 8 additions and 2 deletions
|
@ -506,10 +506,16 @@ function atAddTask( timeMins, callback, world, repeat){
|
||||||
atTasks[worldName][timeMins].push({callback: callback, repeat: repeat});
|
atTasks[worldName][timeMins].push({callback: callback, repeat: repeat});
|
||||||
}
|
}
|
||||||
var atMonitors = [];
|
var atMonitors = [];
|
||||||
events.loadWorld(function(evt){
|
function onLoadStartMonitor(evt){
|
||||||
var monitor = setInterval( atMonitorFactory(evt.world), 900);
|
var monitor = setInterval( atMonitorFactory(evt.world), 900);
|
||||||
atMonitors.push( monitor );
|
atMonitors.push( monitor );
|
||||||
});
|
}
|
||||||
|
if (__plugin.canary){
|
||||||
|
events.loadWorld( onLoadStartMonitor );
|
||||||
|
}
|
||||||
|
if (__plugin.bukkit){
|
||||||
|
events.worldLoad( onLoadStartMonitor );
|
||||||
|
}
|
||||||
|
|
||||||
addUnloadHandler(function(){
|
addUnloadHandler(function(){
|
||||||
_foreach(atMonitors, function(atInterval){
|
_foreach(atMonitors, function(atInterval){
|
||||||
|
|
Reference in a new issue