This commit is contained in:
HaHaWTH 2024-03-28 04:56:52 +08:00
parent b1c655bbc7
commit 54872f102d

View File

@ -55,8 +55,8 @@ public class BukkitService implements SettingsDependent {
* *
* @param task Task to be executed * @param task Task to be executed
*/ */
public void scheduleSyncDelayedTask(Runnable task) { public int scheduleSyncDelayedTask(Runnable task) {
getScheduler().runTask(task); return Bukkit.getScheduler().scheduleSyncDelayedTask(authMe, task);
} }
/** /**
@ -67,8 +67,8 @@ public class BukkitService implements SettingsDependent {
* @param task Task to be executed * @param task Task to be executed
* @param delay Delay in server ticks before executing task * @param delay Delay in server ticks before executing task
*/ */
public void scheduleSyncDelayedTask(Runnable task, long delay) { public int scheduleSyncDelayedTask(Runnable task, long delay) {
getScheduler().runTaskLater(task, delay); return Bukkit.getScheduler().scheduleSyncDelayedTask(authMe, task, delay);
} }
/** /**
@ -181,8 +181,8 @@ public class BukkitService implements SettingsDependent {
* @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if plugin is null
* @throws IllegalArgumentException if task is null * @throws IllegalArgumentException if task is null
*/ */
public void runTaskAsynchronously(Runnable task) { public BukkitTask runTaskAsynchronously(Runnable task) {
getScheduler().runTaskAsynchronously(task); return Bukkit.getScheduler().runTaskAsynchronously(authMe, task);
} }
/** /**