slipcor / TreeAssist

https://www.spigotmc.org/resources/treeassist.67436/
GNU General Public License v3.0
34 stars 19 forks source link

[suggestion] Folia support #95

Open cgw2023 opened 1 year ago

cgw2023 commented 1 year ago

Folia is a new papermc offical fork https://github.com/PaperMC/Folia, it changes chunk loading and more things to improve server performances, it is getting more popular now and stable, how ever, most of the plugin does not compatible with folia since folia does not have main thread. There is currently no plugin for cutting trees. Can you add support for folia?

here is the error shown if folia run treeassist image

[10:18:58 INFO]: [TreeAssist] debugging: off
[10:18:58 ERROR]: Error occurred while enabling TreeAssist v7.3.41 (Is it up to date?)
java.lang.UnsupportedOperationException: null
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.handle(CraftScheduler.java:533) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:233) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:209) ~[folia-1.20.1.jar:git-Folia-21]
        at net.slipcor.treeassist.blocklists.FlatFileBlockList.initiate(FlatFileBlockList.java:218) ~[TreeAssist.jar:?]
        at net.slipcor.treeassist.TreeAssist.onEnable(TreeAssist.java:333) ~[TreeAssist.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[folia-1.20.1.jar:git-Folia-21]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:642) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:553) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:679) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:463) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:346) ~[folia-1.20.1.jar:git-Folia-21]        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[10:18:58 INFO]: [TreeAssist] Disabling TreeAssist v7.3.41
[10:18:58 ERROR]: Error occurred (in the plugin loader) while disabling TreeAssist v7.3.41 (Is it up to date?)
java.lang.UnsupportedOperationException: null
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.handle(CraftScheduler.java:533) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.cancelTasks(CraftScheduler.java:346) ~[folia-1.20.1.jar:git-Folia-21]
        at net.slipcor.treeassist.TreeAssist.onDisable(TreeAssist.java:273) ~[TreeAssist.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:283) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:224) ~[folia-1.20.1.jar:git-Folia-21]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:109) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:537) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:193) ~[folia-1.20.1.jar:git-Folia-21]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:642) ~[folia-1.20.1.jar:git-Folia-21]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:553) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:679) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:463) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188) ~[folia-1.20.1.jar:git-Folia-21]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:346) ~[folia-1.20.1.jar:git-Folia-21]        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Please consider it, thank you.