Core Design Principles
1. Paper-native first
ByteLib uses Paper's modern plugin system, utilizing:
paper-plugin.ymlPluginBootstrapPluginLoader
Legacy Bukkit patterns have been avoided unless strictly necessary
2. Two Injectors (Critical Concept)
ByteLib intentionally splits dependency injection into two Guice injectors:
Injector | Purpose |
|---|---|
Bootstrap Injector | Exists before the plugin instance |
Plugin (Child) Injector | Exists after the plugin instance |
This avoids Guice accidentally constructing a second plugin instance, which can cause everything from subtle bugs to the plugin flat-out refusing to enable
Bootstrap Injector (DO NOT TOUCH THE PLUGIN)
Used only for:
PluginMetaComponentLoggerPlugin Path (data folder)
Wiring resolution
Pure services that do not depend on
Plugin
Never bind or inject:
PluginJavaPluginYour concrete plugin class
Listeners
Commands
Schedulers
Databases
Plugin (Child) Injector
Created after Paper constructs the plugin instance.
This injector:
Binds the real Paper-managed plugin instance
Installs plugin-specific modules
Runs lifecycle hooks
Registers commands & listeners
Owns SQLite, config, timers, etc.