PaperMC / Velocity

The modern, next-generation Minecraft server proxy.

Home Page:https://papermc.io/software/velocity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Feature to Specify Plugin Loading Priority

waterghost-2046 opened this issue · comments

Plugin loading order is not specified, which causes a lot of compatibility issues. Example: The message formatting plugin cancels the message before the punishing plugin cancels the message. After the format plugin cancels the message, then sends the message using its own protocol. There is also a way to add optional dependencies, but this is passive (adding all punishing plugins to the dependencies) and specifying load order can solve similar types of problems.
스크린샷 2024-06-15 오전 9 46 30

Velocity loads plugins using a standard topological sorting algorithm to determine the order. Topological sorts simply do not permit for arbitrary orders as specified by the user, they just ensure that the dependencies are loaded in the order you want. Of course, the use of a topological sort happens to be an implementation detail that could be changed at any time.

If you need to hook into a plugin to make it not do certain things, the knobs you turn can include hooks within the plugins in question (the Velocity event system can also be used by plugins that define their own events!) and event ordering. Finally, of course, you can use the dependency system to control in what order Velocity will load plugins.

Adding a "pretty please load this plugin in a given order" option to plugins will likely result in plugins doing all sorts of really stupid and potentially buggy things.