-
-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Description
Provide a way for the command manager to receive dependencies and provide standard dependency injection abilities
Such as
manager.addDependency(Plugin.class, plugin);
manager.addDependency(MyPlugin.class, plugin);
manager.addDependency(MyObjectManager.class, objManager);
public MyCommandClass extends BaseCommand {
@Dependency MyPlugin plugin;
@Dependency MyObjectManager manager;
// ... commands
}
On registration, ACF can fulfill the dependencies as provided, as commonly seen in more featured dependency injection frameworks.