Andre601/AdvancedServerList

Folia support

Closed this issue · 7 comments

Platforms

Server (Spigot, Paper, ...)

Feature

I know it's early days, but I've started testing plugins against Folia builds. When you have a few spare cycles, a Folia-compatible version would be nice.

As a test, I edited plugin.yml to present it as folia-supported: true, but it wasn't happy. On server start-up, it returned

[15:05:11] [ServerMain/ERROR]: [DirectoryProviderSource] Error loading plugin: File 'plugins/AdvancedServerList-Bukkit-3.0.0-b2-folia.jar' failed to load!
java.lang.RuntimeException: File 'plugins/AdvancedServerList-Bukkit-3.0.0-b2-folia.jar' failed to load!
        at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:59) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.lambda$registerProviders$2(DirectoryProviderSource.java:32) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:30) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:14) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:14) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:100) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at net.minecraft.server.Main.main(Main.java:126) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at org.bukkit.craftbukkit.Main.main(Main.java:309) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
        at java.lang.Thread.run(Thread.java:1623) ~[?:?]
Caused by: java.lang.RuntimeException: Could not load plugin 'AdvancedServerList v3.0.0-b2' as it is not marked as supporting Folia!
        at io.papermc.paper.plugin.provider.type.paper.PaperPluginProviderFactory.build(PaperPluginProviderFactory.java:29) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.provider.type.paper.PaperPluginProviderFactory.build(PaperPluginProviderFactory.java:23) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.provider.type.PluginFileType.register(PluginFileType.java:67) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:57) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        ... 20 more

Glare (darbyjack) helped me test it before and it worked from what he told me.
Tho, that was a few weeks ago and I can't tell if there were more changes that also affect my plugin...

I'll push a change, tho you'll have to build it yourself this time to test (a simple mvn --projects :core,:bukkit clean install should work here) as I'm currently busy with other things.

Pushed the change to the plugin.yml

I've gone ahead and made a PR to trigger a build for the artifact:
#78

Of course, until we have a folia-compliant ProtocolLib, it isn't going to load. And until we have a folia-compliant PlaceholderAPI, placeholders won't be parsed.

Yup, that's the sad truth we live in... If only it would work with the paper-plugin system. 😭

I'll be patient. I'm not going to build every dependency from folia-promising branches. Folia simply isn't ready for third-party testing.

Apparently, ASL is now folia-enabled.