Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
implementation of isQueued()
Dieser Commit ist enthalten in:
Ursprung
6335a5af76
Commit
6269c1e633
@ -223,4 +223,18 @@ public class CraftScheduler implements BukkitScheduler, Runnable {
|
||||
public boolean isCurrentlyRunning(int taskId){
|
||||
return craftThreadManager.isAlive(taskId);
|
||||
}
|
||||
|
||||
public boolean isQueued(int taskId) {
|
||||
synchronized (schedulerQueue) {
|
||||
Iterator<CraftTask> itr = schedulerQueue.keySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
CraftTask current = itr.next();
|
||||
if (current.getIdNumber() == taskId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren