mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-30 22:24:18 +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)
|
||||
{
|
||||
int id = taskCounter.getAndIncrement();
|
||||
return tasks.put( id, new BungeeTask( taskCounter.getAndIncrement(), owner, task ) );
|
||||
Preconditions.checkNotNull( owner, "owner" );
|
||||
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