Skip to content

Added an api method to unload plugins#649

Closed
abhithedev200 wants to merge 1 commit into
PaperMC:masterfrom
abhithedev200:master
Closed

Added an api method to unload plugins#649
abhithedev200 wants to merge 1 commit into
PaperMC:masterfrom
abhithedev200:master

Conversation

@abhithedev200
Copy link
Copy Markdown

so finally a api method to unload plugins fully at runtime. requested by an user on waterfall discord

@Xernium
Copy link
Copy Markdown
Contributor

Xernium commented Jun 2, 2021

This functionality isn’t something that should be supported in any scenario. Un-or-reloading of plugins at runtime is never completely clean and leads to more issues than it solves. I hope that the paper team shares my notion to reject this

@astei
Copy link
Copy Markdown
Contributor

astei commented Jun 2, 2021

There are many, many plugins that do not tolerate being cleaned up in this fashion. This was something we learned from Bukkit/Spigot and it wasn't a good idea then, and it isn't a good idea now. Major plugins like ViaVersion already provide no guarantee of support if unloaded at run time.

We should not do this.

@abhithedev200
Copy link
Copy Markdown
Author

abhithedev200 commented Jun 3, 2021

well i would say its developers responsibility unload correct plugins. like not unloading the plugin that serves dependency for other plugins. other option is to remove classloader release. so whats the better way for this?

@electronicboy
Copy link
Copy Markdown
Member

The JVM was not designed to deal with this and I see little reason for trying to support this mess given that there are already plugins out there which allow people to shoot themselves in the foot for this

@abhithedev200
Copy link
Copy Markdown
Author

abhithedev200 commented Jun 3, 2021

true, but just calling onDisable and unregister plugins commands,listeners,tasks and removing it from loaded plugins would be less mess i suppose. please correct me if i am wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants