mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-28 05:05:21 +01:00
Fix issue #219 - make the scheduler work
This commit is contained in:
parent
86b864ce21
commit
a564d4c7f1
@ -68,7 +68,10 @@ public class BungeeScheduler implements TaskScheduler
|
|||||||
|
|
||||||
private BungeeTask prepare(Plugin owner, Runnable task)
|
private BungeeTask prepare(Plugin owner, Runnable task)
|
||||||
{
|
{
|
||||||
int id = taskCounter.getAndIncrement();
|
Preconditions.checkNotNull( owner, "owner" );
|
||||||
return tasks.put( id, new BungeeTask( taskCounter.getAndIncrement(), owner, task ) );
|
Preconditions.checkNotNull( task, "task" );
|
||||||
|
BungeeTask prepared = new BungeeTask( taskCounter.getAndIncrement(), owner, task );
|
||||||
|
tasks.put( prepared.getId(), prepared );
|
||||||
|
return prepared;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user