#1297: Change Consumer and Predicates to super

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-11-14 19:50:14 +13:00
parent 85c79bdde0
commit 3e6f41a01b
5 changed files with 23 additions and 23 deletions

View File

@@ -121,7 +121,7 @@ public class CraftScheduler implements BukkitScheduler {
}
@Override
public void runTask(Plugin plugin, Consumer<BukkitTask> task) throws IllegalArgumentException {
public void runTask(Plugin plugin, Consumer<? super BukkitTask> task) throws IllegalArgumentException {
runTaskLater(plugin, task, 0L);
}
@@ -137,7 +137,7 @@ public class CraftScheduler implements BukkitScheduler {
}
@Override
public void runTaskAsynchronously(Plugin plugin, Consumer<BukkitTask> task) throws IllegalArgumentException {
public void runTaskAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task) throws IllegalArgumentException {
runTaskLaterAsynchronously(plugin, task, 0L);
}
@@ -152,7 +152,7 @@ public class CraftScheduler implements BukkitScheduler {
}
@Override
public void runTaskLater(Plugin plugin, Consumer<BukkitTask> task, long delay) throws IllegalArgumentException {
public void runTaskLater(Plugin plugin, Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException {
runTaskTimer(plugin, task, delay, CraftTask.NO_REPEATING);
}
@@ -168,12 +168,12 @@ public class CraftScheduler implements BukkitScheduler {
}
@Override
public void runTaskLaterAsynchronously(Plugin plugin, Consumer<BukkitTask> task, long delay) throws IllegalArgumentException {
public void runTaskLaterAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException {
runTaskTimerAsynchronously(plugin, task, delay, CraftTask.NO_REPEATING);
}
@Override
public void runTaskTimerAsynchronously(Plugin plugin, Consumer<BukkitTask> task, long delay, long period) throws IllegalArgumentException {
public void runTaskTimerAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException {
runTaskTimerAsynchronously(plugin, (Object) task, delay, CraftTask.NO_REPEATING);
}
@@ -188,7 +188,7 @@ public class CraftScheduler implements BukkitScheduler {
}
@Override
public void runTaskTimer(Plugin plugin, Consumer<BukkitTask> task, long delay, long period) throws IllegalArgumentException {
public void runTaskTimer(Plugin plugin, Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException {
runTaskTimer(plugin, (Object) task, delay, period);
}