VelocityHotReloader is a Velocity plugin focused on safe runtime plugin lifecycle operations: load, enable, disable, unload, reload, and watch-for-change reload.
- Provide fast operational control without full proxy restarts.
- Keep plugin lifecycle operations explicit and auditable.
- Protect operators from accidental dependency breakage unless they intentionally force actions.
- Keep command and messaging behavior consistent for console and in-game audiences.
VelocityHotReloaded: plugin bootstrap and lifecycle entrypoint.CommandVHR: Brigadier command tree for/velocityhotreloaderand/vhr.VelocityPluginManager: lifecycle operations and dependency-aware ordering.WatchManager+PluginWatcherTask: asynchronous file watching and debounced reload execution.VelocityPluginCommandManager: persisted command-to-plugin mapping cache.MessagesResource: MiniMessage-backed message loading and rendering.
Startup:
- Plugin cache and message resources are initialized.
- Command tree is registered once.
- Manager instances are created for lifecycle, task scheduling, and watcher orchestration.
Command execution:
- Permission checks happen at command-node level.
- Input is parsed into plugin or jar targets.
- Dependency checks run before unload/reload/watch operations.
- Result objects aggregate outcomes and format user-facing responses.
Watcher execution:
- A watch task tracks plugin jar create/modify/delete events.
- Rapid file events are debounced into a single reload pass.
- Reload results are reported back to initiating audiences.
- Lifecycle operations rely on Velocity internals through dedicated reflection wrappers.
- Plugin interaction is centralized in manager classes instead of being spread across command handlers.
- Messages and placeholders are separated from business logic through typed message keys.
For operators, this architecture reduces restart pressure and speeds troubleshooting.
For contributors, it keeps change boundaries clear: command parsing in command classes, lifecycle behavior in managers, and user-facing text in resources.