MorePaperLib
MorePaperLib copied to clipboard
Make Folia detection method more resilient to shading the server platform
Currently, MorePaperLib checks for the presence of a certain Folia API class to determine whether Folia is being used.
This can break if another plugin has shaded the entire Folia server platform, which is most certainly a bug in its own right and drastic for the server.
Nevertheless, this means a MorePaperLib-dependent plugin can sometimes break as an additional consequence. See, for example, https://github.com/A248/LibertyBans/issues/283 . To resolve this, we might check for methods on existing classes (like the method mentioned in the linked NoSuchMethodError) instead of a certain class on the classpath.