Reloading works, but I have two issues, which are probably caused by the classloader(s).
Issues:
-
I am not able to cast a Plugin to its own class.
I am trying to get a Plugin and cast it to its class to use its methods.
That works fine, after server start.
But after/while a reload its not able to cast the class to its correct type.
-
LuckPerms uses a class with a static API field.
For some reason that field is never initialized after reload.
Probably since the Plugin is using another instance of the class.
I heard/guess that for some reason multiple classloaders are present, or classes loaded by two different classloaders. I am not sure where or when this exactly happens.
But it causes the plugins to have different classes, which forces me to restart the proxy.
Reloading works, but I have two issues, which are probably caused by the classloader(s).
Issues:
I am not able to cast a Plugin to its own class.
I am trying to get a Plugin and cast it to its class to use its methods.
That works fine, after server start.
But after/while a reload its not able to cast the class to its correct type.
LuckPerms uses a class with a static API field.
For some reason that field is never initialized after reload.
Probably since the Plugin is using another instance of the class.
I heard/guess that for some reason multiple classloaders are present, or classes loaded by two different classloaders. I am not sure where or when this exactly happens.
But it causes the plugins to have different classes, which forces me to restart the proxy.