public function addPlugin(PluginInterface $plugin)
    {
        $plugin->onAdd($this); // Called before adding the plugin, because it may throw an exception
        $this->plugins[] = $plugin;
        
        return $this;
    }