13
0
geforkt von Mirrors/Paper

SPIGOT-4500: callSyncMethod broken

Dieser Commit ist enthalten in:
md_5 2018-11-24 17:52:29 +11:00
Ursprung 8cd538e661
Commit 97b0057ad3
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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");
}

Datei anzeigen

@ -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 {