Skip to content

Class loading issue #1

@Ecconia

Description

@Ecconia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions