Skip to content

An error occurs during reload when the main class specified in paper-plugin.yml is not a instance of JavaPlugin. #11583

@vjh0107

Description

@vjh0107

Expected behavior

It should load properly, just as it does when the server starts up

Observed/Actual behavior

it occurs when the server is reloaded.

Image
https://pastebin.com/cn0DzfES

Steps/models to reproduce

Create an instance of JavaPlugin with PluginBootstrap, but the main class in Plugin meta should not implement Java Plugin.

My case:

1.	Provide the application’s main class in paper-plugin.yml.
2.	Instantiate the application and create a dummy JavaPlugin with the application context as a parameter to handle the plugin’s lifecycle.
3.	Everything is OK when the server’s bootstrap has finished.
4.	Reloading the server causes it to break down.

Plugin and Datapack List

I tested it in a vanilla environment.

Paper version

[16:32:27 INFO]: Checking version, please wait...
[16:32:27 INFO]: This server is running Paper version 1.21.3-12-master@c6aa61e (2024-11-04T17:51:59Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    Status

    Invalid

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions