This comes with two big benefits:
- PluginLoading should be much faster again (I didn't perform any measurements)
- Plugins that depend on classes that are not available at runtime (e.g. plugin that depend on multiple NMS versions) don't crash when they're loaded if those classes aren't used at runtime.
This will affect JavaPlugins that depend on ScalaPlugins, they are by default not be able to find classes from the ScalaPlugin when used before the ScalaPlugin has used those classes themself.
An extra method to the ScalaPluginLoader was added to forcefully load all classes of a ScalaPlugin, to use it simply call ScalaPluginLoader.getInstance().forceLoadAllClasses(scalaPlugin) in the onEnable of your JavaPlugin. Make sure the JavaPlugin depends on ScalaLoader.