#935: Change Consumer and Predicates to super

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2023-11-14 19:50:23 +13:00
parent 2dc53c2502
commit 72d2572304
6 changed files with 20 additions and 20 deletions

View File

@@ -227,7 +227,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTask(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task) throws IllegalArgumentException;
public void runTask(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task
@@ -267,7 +267,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTaskAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task) throws IllegalArgumentException;
public void runTaskAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task
@@ -305,7 +305,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTaskLater(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task, long delay) throws IllegalArgumentException;
public void runTaskLater(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task
@@ -350,7 +350,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTaskLaterAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task, long delay) throws IllegalArgumentException;
public void runTaskLaterAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task
@@ -391,7 +391,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTaskTimer(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task, long delay, long period) throws IllegalArgumentException;
public void runTaskTimer(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task
@@ -441,7 +441,7 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null
*/
public void runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<BukkitTask> task, long delay, long period) throws IllegalArgumentException;
public void runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException;
/**
* @param plugin the reference to the plugin scheduling task