SPIGOT-4500: callSyncMethod broken
Dieser Commit ist enthalten in:
Ursprung
8cd538e661
Commit
97b0057ad3
@ -437,7 +437,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
private static void validate(final Plugin plugin, final Object task) {
|
||||
Validate.notNull(plugin, "Plugin cannot be null");
|
||||
Validate.notNull(task, "Task cannot be null");
|
||||
Validate.isTrue(task instanceof Runnable || task instanceof Consumer, "Task must be Runnable or Consumer");
|
||||
Validate.isTrue(task instanceof Runnable || task instanceof Consumer || task instanceof Callable, "Task must be Runnable, Consumer, or Callable");
|
||||
if (!plugin.isEnabled()) {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register task while disabled");
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class CraftTask implements BukkitTask, Runnable {
|
||||
this.cTask = (Consumer<BukkitTask>) task;
|
||||
this.rTask = null;
|
||||
} else if (task == null) {
|
||||
// Head task
|
||||
// Head or Future task
|
||||
this.rTask = null;
|
||||
this.cTask = null;
|
||||
} else {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren