Example #1
0
 /// <summary>
 /// Called when this plugin has been added to the specified manager
 /// </summary>
 /// <param name="manager"></param>
 public virtual void HandleAddedToManager(PluginManager manager)
 {
     Manager = manager;
     if (HasConfig) LoadConfig();
     if (HasMessages) LoadDefaultMessages();
     OnAddedToManager?.Invoke(this, manager);
     RegisterWithCovalence();
 }
Example #2
0
 /// <summary>
 /// Called when this plugin has been removed from the specified manager
 /// </summary>
 /// <param name="manager"></param>
 public virtual void HandleRemovedFromManager(PluginManager manager)
 {
     UnregisterWithCovalence();
     if (Manager == manager)
     {
         Manager = null;
     }
     OnRemovedFromManager?.Invoke(this, manager);
 }
Example #3
0
 /// <summary>
 /// Called when this plugin has been added to the specified manager
 /// </summary>
 /// <param name="manager"></param>
 public virtual void HandleAddedToManager(PluginManager manager)
 {
     Manager = manager;
     if (HasConfig)
     {
         LoadConfig();
     }
     OnAddedToManager?.Invoke(this, manager);
     RegisterWithCovalence();
 }
Example #4
0
        public virtual void HandleRemovedFromManager(PluginManager manager)
        {
            this.UnregisterWithCovalence();
            if (this.Manager == manager)
            {
                this.Manager = null;
            }
            PluginManagerEvent onRemovedFromManager = this.OnRemovedFromManager;

            if (onRemovedFromManager == null)
            {
                return;
            }
            onRemovedFromManager.Invoke(this, manager);
        }
Example #5
0
        public virtual void HandleAddedToManager(PluginManager manager)
        {
            this.Manager = manager;
            if (this.HasConfig)
            {
                this.LoadConfig();
            }
            if (this.HasMessages)
            {
                this.LoadDefaultMessages();
            }
            PluginManagerEvent onAddedToManager = this.OnAddedToManager;

            if (onAddedToManager != null)
            {
                onAddedToManager.Invoke(this, manager);
            }
            else
            {
            }
            this.RegisterWithCovalence();
        }