Revert "wtf 1"

This reverts commit b1c655bbc7a98ab25e0711458647a226f30f99bd.
This commit is contained in:
HaHaWTH 2024-03-28 05:35:13 +08:00
parent 54872f102d
commit 409eb21b85

View File

@ -80,7 +80,7 @@ public class BukkitService implements SettingsDependent {
*/ */
public void scheduleSyncTaskFromOptionallyAsyncTask(Runnable task) { public void scheduleSyncTaskFromOptionallyAsyncTask(Runnable task) {
if (Bukkit.isPrimaryThread()) { if (Bukkit.isPrimaryThread()) {
task.run(); runTask(task);
} else { } else {
scheduleSyncDelayedTask(task); scheduleSyncDelayedTask(task);
} }
@ -93,8 +93,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 BukkitTask runTask(Runnable task) { public void runTask(Runnable task) {
return Bukkit.getScheduler().runTask(authMe, task); getScheduler().runTask(task);
} }
public void runTask(Entity entity, Runnable task) { public void runTask(Entity entity, Runnable task) {