lucko / helper

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins.
MIT License
457 stars 87 forks source link

Folia support #147

Open Anon8281 opened 1 year ago

Anon8281 commented 1 year ago

Example with Gui:

Caused by: java.lang.UnsupportedOperationException at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.handle(CraftScheduler.java:536) ~[folia-1.19.4.jar:git-Folia-"ca3b7ad"] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:236) ~[folia-1.19.4.jar:git-Folia-"ca3b7ad"] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:212) ~[folia-1.19.4.jar:git-Folia-"ca3b7ad"] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:176) ~[folia-1.19.4.jar:git-Folia-"ca3b7ad"] at me.lucko.helper.promise.HelperPromise.executeDelayedSync(HelperPromise.java:175) ~[helper-5.6.13_folia.jar:?] at me.lucko.helper.promise.HelperPromise.supplyDelayedSync(HelperPromise.java:308) ~[helper-5.6.13_folia.jar:?] at me.lucko.helper.promise.Promise.supplyDelayed(Promise.java:508) ~[helper-5.6.13_folia.jar:?] at me.lucko.helper.promise.Promise.supplyingDelayed(Promise.java:177) ~[helper-5.6.13_folia.jar:?] at me.lucko.helper.scheduler.Scheduler.runLater(Scheduler.java:135) ~[helper-5.6.13_folia.jar:?] at me.lucko.helper.menu.Gui.open(Gui.java:263) ~[helper-5.6.13_folia.jar:?]

lucko commented 1 year ago

I have no plans to work on Folia support for helper, but PRs would be accepted :)

joestr commented 11 months ago

It's a bit tricky to implement since Folia scheduling requires knowledge about the the Entity if a EntityScheduler is used. Also Folia does not have the concept of synced tasks.