Skip to content

Improve plugin load and unload ordering#188

Merged
RhysB merged 2 commits into
masterfrom
load-order
May 3, 2026
Merged

Improve plugin load and unload ordering#188
RhysB merged 2 commits into
masterfrom
load-order

Conversation

@RhysB
Copy link
Copy Markdown
Member

@RhysB RhysB commented Apr 7, 2026

📌 Pull Request

Description

Improve plugin load, enable, and disable ordering by introducing a plugin load order planner.

Behaviour:

  • Plans the plugin load order utilizing the plugin.yml information.
  • Makes the load order deterministic to prevent OS/Java types from effecting load order.
  • Priority hard dependencies over soft dependencies where possible.
  • Disable plugins in the reverse order.

Related Issues / Discussions

Fixes issues discussed in the RetroMC Discord with Zavdav and RobertWesner

  • Fixes #
  • Related to #

Motivation & Context

Fixes several bugs regarding plugin loading, enabling, and disabling.

Type of Change

Please tick all that apply:

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ⚡ Performance improvement
  • 🧩 New feature (non-breaking)
  • 🔧 Refactor / cleanup (no functional changes)
  • 🔥 Crash / exploit fix
  • 📚 Documentation update
  • ❗ Breaking change (may affect plugins or server behavior)

Testing Performed

  • Compiled successfully with mvn clean package
  • Tested on a Beta 1.7.3 server
  • Existing functionality verified
  • Edge cases considered

Test details:

- Tested on the RetroMC development server with approx 70 plugins.
- PR resolves load issues we have previously had with some of our plugins.

Compatibility Considerations

  • No known compatibility impact
  • Potential plugin impact (described below)
  • Network / protocol (Netcode) behavior changed
  • Configuration change required

Compatibility Notes

This PR shouldn't break compatibility of plugins with correct plugin.yml files.

Checklist

Please confirm the following:

  • No unnecessary formatting or whitespace-only changes
  • Changes are compatible with Minecraft Beta 1.7.3
  • No dependencies have been added without discussion with the RetroMC team

Copy link
Copy Markdown

@RobertWesner RobertWesner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, but the code has some minor edges that we might want to change.

Comment thread src/main/java/org/bukkit/plugin/SimplePluginManager.java Outdated
Comment thread src/main/java/org/bukkit/plugin/SimplePluginManager.java Outdated
Comment thread src/main/java/org/bukkit/craftbukkit/CraftServer.java
Comment thread src/main/java/com/legacyminecraft/poseidon/PluginLoadPlanner.java Outdated
Comment thread src/main/java/com/legacyminecraft/poseidon/PluginLoadPlanner.java Outdated
Comment thread src/main/java/com/legacyminecraft/poseidon/PluginLoadPlanner.java
Comment thread src/main/java/org/bukkit/plugin/SimplePluginManager.java Outdated
Comment thread src/main/java/org/bukkit/craftbukkit/CraftServer.java Outdated
@RhysB RhysB merged commit a9af58a into master May 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants