1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 02:34:30 +01:00

Add getMainThreadExecutor to BukkitScheduler

This commit is contained in:
Aleksander Jagiello 2021-01-24 22:17:29 +01:00
parent 65807cfb9b
commit 2c77cdd67a

View file

@ -457,4 +457,15 @@ public interface BukkitScheduler {
@Deprecated(since = "1.7.10")
@NotNull
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
}