mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Add getMainThreadExecutor to BukkitScheduler
This commit is contained in:
@@ -457,4 +457,15 @@ public interface BukkitScheduler {
|
|||||||
@Deprecated(since = "1.7.10")
|
@Deprecated(since = "1.7.10")
|
||||||
@NotNull
|
@NotNull
|
||||||
public BukkitTask runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable task, long delay, long period) throws IllegalArgumentException;
|
public BukkitTask runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable task, long delay, long period) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
// Paper start - add getMainThreadExecutor
|
||||||
|
/**
|
||||||
|
* Returns an executor that will run tasks on the next server tick.
|
||||||
|
*
|
||||||
|
* @param plugin the reference to the plugin scheduling tasks
|
||||||
|
* @return an executor associated with the given plugin
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
public java.util.concurrent.Executor getMainThreadExecutor(@NotNull Plugin plugin);
|
||||||
|
// Paper end
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user