Solved Plugin not loading due to soft dependency not loaded

Discussion in 'Spigot Plugin Development' started by PCPSells, Jun 2, 2018.

  1. Okay, I already know I'm bout to sound dumb as hell for this.
    But here comes the heat xD

    Quick question:
    I have a resource that has MVdWUpdater as a soft dependency to update it.
    Unfortunately I'm having the issue of my resource not loading at all due to
    MVdWUpdater not being loading. It's saved as a soft dependency in the plugin.yml.

    I know to do this much:
    Code (Java):
    private boolean setupStartupPlugins() {
            if (getServer().getPluginManager().getPlugin("MVdWUpdater") == null) {
    /// something here ;-;
    }}
    and obviously make that run on onEnable(). How would I make it so where it doesn't completely stop my resource from loading?
     
  2. can we see your plugin.yml?
    /e as long as you dont add anything to your depend list, your plugin will never forcibly not run.
     
    #2 Warren1001, Jun 2, 2018
    Last edited: Jun 2, 2018
  3. Add it to your plugin.yml, it's also explained in the plugin.yml tutorial on the wiki.
     
  4. So if the MVdWUpdater does not load you want to do what? Force it to load? Disable the plugin?
    If you want to disable the plugin you should do
    Code (Java):
    this.getLogger().severe("Error: Updated not loaded");
    Bukkit.getPluginManager().disablePlugin(this);
    return;
     
  5. No no, it's a softdependency. I want it to still load without having MVdWUpdater loaded.
     
  6. I have vault as a dependency.
     
  7. Here's the dependencies & softdependencies in the plugin.yml for the resource -
    depends: [Vault]
    softdepends: [MVdWUpdater]
     
  8. I said I had it in the plugin.yml in the post :)
     
  9. theres no s.
    its just
    depend: [Vault]
    softdepend: [MVdWUpdater]
     
  10. Ah, should've just checked my other resources. I done goofed. Thank you! :LOL: