Plugin load orders

Discussion in 'Plugin Development' started by Aza24, Oct 3, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Aza24

    I am having a problem with my soft dependency unloading before my plugin if it didn't exist before I loaded mine.

    This is how I have it set-up:
    • The dependency is registered softly in my plugin.yml
    • When my plugin is enabled the dependency is copied, loaded and enabled if it can not be found
    Whenever it does the second step the dependency doesn't seem to register as a soft dependency for my plugin and therefore unloads first. Is there any way to set the soft dependency after my plugin has been enabled?
     
  2. Offline

    makskay

    Plugins always unload in reverse load order. If you load your soft dependency after your own plugin is loaded (which you're guaranteeing will happen if the soft dependency doesn't already exist when your plugin is first enabled), then your soft dependency will unload first.
     
  3. Offline

    Aza24

    Hmm. Can I listen for a plugin disable event and cancel it then disable it at the end of my onDisable();?
     
  4. Offline

    makskay

    PluginDisableEvents don't appear to be cancellable. You can detect when the dependency plugin unloads, but if you re-enable it it'll just be unloaded immediately before your own plugin is unloaded - exactly as before.
     
  5. Offline

    Aza24

    Damn.
     
Thread Status:
Not open for further replies.

Share This Page