Open Anon8281 opened 1 year ago
This PR renames the plugin and heavily alters formatting away from the style guide. Including a random dependency is also not something that should be done
I also question if this is enough to make it folia compatible in the first place. Most likely any folia compatibility for CraftBook would need to be done in CraftBook 5, as it’ll almost definitely entirely break support for spigot
i changed the name of plugin in settings from 'craftbook' to 'CraftBook' because of java.lang.IllegalStateException: Module entity with name: CraftBook.main should be available
According to my tests, it's enough to make folia compatible.
I also question if this is enough to make it folia compatible in the first place. Most likely any folia compatibility for CraftBook would need to be done in CraftBook 5, as it’ll almost definitely entirely break support for spigot
We've managed to achieve support of Java 8(and old versions of spigot) by using this library. It builds the library using the tricky way, by including(not shaded) some mocked java 8 paper/folia API.
Basically it means, that the plugin will support folia as well as paper, spigot, and old versions of them that using java 8.
Of course, it's maybe not enough to get the stable support of folia, however, it could be a nice start that will not broke any spigot/paper integrations and the same time will achieve folia support.
We can include the code from library just in your project, hovewer, I'm not sure that it's a good thing because it will cause some issues with old spigot/paper
Renaming the plugin and modifying large amounts of the formatting are not acceptable to do in a PR, we have a style guide and renaming the plugin is an extremely breaking change.
As for the library, it's not something that I'm really comfortable including here. CraftBook has existed for a very long time, and external libraries have almost always ended up causing large issues. If PaperLib provides support for this that maintains Spigot compatibility we can add it to CraftBook 3, otherwise Folia support won't come outside of CraftBook 5.
Either way though, until WorldEdit supports Folia this is a non-starter, as WorldEdit is a hard dependency.
Using https://github.com/Anon8281/UniversalScheduler