This repository was archived by the owner on Dec 24, 2025. It is now read-only.
Repository navigation
Hot Reload System & LoadLib Enhancements
Pre-release
Pre-release
Major feature release introducing automatic hot reload capabilities for rapid plugin development, plus enhanced native library loading system.
Hot Reload System
- Automatic file change detection every 5 seconds
- Instant plugin reloading without server restart
- Content-based change detection using file hashing
- Enable with hot_reload = true in manifest
- Complete API for manual control
Enhanced LoadLib
- Custom entry point function names support
- Single or multiple function name attempts
- Fallback to default naming patterns
- Better compatibility with non-standard libraries
Loader Improvements
- Plugin unload/reload capabilities
- Per-plugin file tracking
- Reload support with state preservation
- Better error reporting
Professional Examples
- Completely rewritten example plugin
- Realistic server configuration patterns
- Event handling best practices
- Production-ready code structure
New API:
-- Hot Reload
Tree.HotReload.checkNow()
Tree.HotReload.getWatchedPlugins()
Tree.HotReload.registerPlugin(pluginInfo)
Tree.HotReload.unregisterPlugin(name)
-- Loader
Tree.Loader.unloadPlugin(name)
Tree.Loader.getLoadedPlugin(name)
-- LoadLib with custom entry points
Tree.LoadLib("mylib", "custom_init")
Tree.LoadLib("mylib", {"init_one", "init_two"})
Files Changed:
- Added: _tree/hotreload.lua (234 lines)
- Enhanced: _tree/loader.lua, _tree/library.lua
- Updated: main.lua, README.md, example plugin files
Important Notes:
- Hot reload is designed for development workflows
- Global variables and event handlers may persist between reloads
- For production environments, disable hot_reload
- Fully backward compatible with existing plugins
Known Limitations:
- Native libraries (.dll/.so) cannot be unloaded
- Event handlers registered with BeamMP may persist
- Complete cleanup requires server restart