Add deprecated BukkitRunnable overloads in the scheduler. Adds BUKKIT-5752

By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
This commit is contained in:
Bukkit/Spigot
2014-08-07 19:26:52 -05:00
parent 7396e8f7c4
commit e5b1ff6d1d
2 changed files with 60 additions and 6 deletions
@@ -19,6 +19,12 @@ public interface BukkitScheduler {
*/
public int scheduleSyncDelayedTask(Plugin plugin, Runnable task, long delay);
/**
* @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)}
*/
@Deprecated
public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task, long delay);
/**
* Schedules a once off task to occur as soon as possible.
* <p>
@@ -30,6 +36,12 @@ public interface BukkitScheduler {
*/
public int scheduleSyncDelayedTask(Plugin plugin, Runnable task);
/**
* @deprecated Use {@link BukkitRunnable#runTask(Plugin)}
*/
@Deprecated
public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task);
/**
* Schedules a repeating task.
* <p>
@@ -43,6 +55,12 @@ public interface BukkitScheduler {
*/
public int scheduleSyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period);
/**
* @deprecated Use {@link BukkitRunnable#runTaskTimer(Plugin, long, long)}
*/
@Deprecated
public int scheduleSyncRepeatingTask(Plugin plugin, BukkitRunnable task, long delay, long period);
/**
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
* should be taken to assure the thread-safety of asynchronous tasks.</b>
@@ -188,6 +206,12 @@ public interface BukkitScheduler {
*/
public BukkitTask runTask(Plugin plugin, Runnable task) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTask(Plugin)}
*/
@Deprecated
public BukkitTask runTask(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException;
/**
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
* should be taken to assure the thread-safety of asynchronous tasks.</b>
@@ -202,6 +226,12 @@ public interface BukkitScheduler {
*/
public BukkitTask runTaskAsynchronously(Plugin plugin, Runnable task) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTaskAsynchronously(Plugin)}
*/
@Deprecated
public BukkitTask runTaskAsynchronously(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException;
/**
* Returns a task that will run after the specified number of server
* ticks.
@@ -215,6 +245,12 @@ public interface BukkitScheduler {
*/
public BukkitTask runTaskLater(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)}
*/
@Deprecated
public BukkitTask runTaskLater(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException;
/**
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
* should be taken to assure the thread-safety of asynchronous tasks.</b>
@@ -231,6 +267,12 @@ public interface BukkitScheduler {
*/
public BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTaskLaterAsynchronously(Plugin, long)}
*/
@Deprecated
public BukkitTask runTaskLaterAsynchronously(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException;
/**
* Returns a task that will repeatedly run until cancelled, starting after
* the specified number of server ticks.
@@ -245,6 +287,12 @@ public interface BukkitScheduler {
*/
public BukkitTask runTaskTimer(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTaskTimer(Plugin, long, long)}
*/
@Deprecated
public BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException;
/**
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
* should be taken to assure the thread-safety of asynchronous tasks.</b>
@@ -262,4 +310,10 @@ public interface BukkitScheduler {
* @throws IllegalArgumentException if task is null
*/
public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException;
/**
* @deprecated Use {@link BukkitRunnable#runTaskTimerAsynchronously(Plugin, long, long)}
*/
@Deprecated
public BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException;
}