Add experimental Velocity plugin reload support#95
Conversation
I added experimental Velocity plugin loading, unloading, and reloading with runtime cleanup, platform-specific configuration and messages, startup warnings, detailed diagnostics, reload timings, and a separate versioned Velocity build.
Velocity unload cleanup fault-tolerant, added version-specific runtime adapters, and introduced debug leak detection for remaining listeners, tasks, commands, and plugin threads.
|
Wait, how's the disable command going to work? |
|
Nevermind, I see now. |
|
Yeah, that’s a fair point. On Velocity, “disable” effectively means unloading the plugin, while “enable” loads it again. I’ll make that distinction clearer in the messages and documentation to avoid confusion. keep that? |
I clarified that Velocity’s `disable` command fully unloads a plugin and `enable` loads it again, updating the command handling, messages, help output, and documentation accordingly.
…ling Renamed the experimental Velocity runtime to a Development Build. Renamed ExperimentalVelocityRuntime to VelocityDevelopmentRuntime. Updated startup warnings, diagnostics, documentation, and adapter messages. Added velocityCrashDumps for automatic crash dumps with unique IDs. Added velocityDevTestFunctions for protected development tools. Added /plugman dev status and /plugman dev crashdump. Added the plugman.dev permission. Added Velocity version, Java version, context, thread, OS, and stacktrace details to crash dumps. Restricted --force entirely to Velocity. Added runtime capability checks before parsing --force. Removed --force from Paper/Bukkit command help, usage text, messages, and documentation. Added Velocity-specific help entries for commands supporting --force. Added migration cleanup for old [--force] entries on non-Velocity platforms.
I restricted PlugManX proxy commands to the Velocity console so player commands can reach backend Paper servers, and added verbose development-mode logging for startup details, runtime operations, command execution, and diagnostics.
I separated Velocity from the shared Core and Paper assembly to prevent Paper reload issues. Paper now uses the stable PR Test-Account666#90 implementation, while Velocity is built separately.
I introduced a platform SPI for Velocity-specific behavior, removed the duplicated Core classes and Sonar exclusions, preserved the stable Paper behavior, and verified both builds with all tests passing.
I separated the Velocity console command alias from /plugman, allowing player commands and tab completion to pass through to Paper while keeping Velocity plugin management console-only.
|
Could you clarify the Java 25 requirement, please? And is it just the Velocity module? |
|
Yes, the Java 25 requirement only applies to the Velocity module because it targets Velocity 4.0 internals. The Core, Paper, Bukkit, and Bungee modules remain on Java 21. |
I aligned the Velocity Maven build with Java 25. Falling back to Java 21 would require dropping Velocity 4.0 support or publishing a separate Java 21 artifact for older Velocity versions.
Zoriot
left a comment
There was a problem hiding this comment.
Other than that works great so far. I had to make the changes to make it build locally.
added classloader-aware packet registry cleanup during plugin unload and failed-load rollback to prevent duplicate packet registrations. This currently works only on Velocity 4.0; I will test and add support for older Velocity versions later.
|



This PR adds experimental runtime plugin management for Velocity 3.4.0 through 4.1.0. Newer versions use the Velocity 4.x adapter after runtime capability checks.
PlugManX can now load, unload, enable, disable, restart, and reload compatible Velocity plugins without restarting the proxy.
Java 25 or newer is required. Velocity has no official runtime reload API, so this development build uses capability-checked internal APIs that may require updates when Velocity changes.
Features:
Showcase:
https://www.youtube.com/watch?v=X3AOtK3jhPo
Download for Velocity:
PlugManX-3.0.5.Velocity.zip