Plugin YML: depends tag not working...

Discussion in 'Spigot Plugin Development' started by crazyhoorse961, May 25, 2017.

  1. Hello!
    I'm using an external plugin for my plugin, but when i have the depends tag it still loads before the dependency.
    First plugin.yml (i added all these depends for testing..)
    Code (YAML):
    name: ProjectGen
    version
    : 1.0.0
    main
    : net.zentya.projectgen.ProjectGen
    softdepend
    : [GroovyLoader]
    softdepends
    : [GroovyLoader]
    depend
    : [GroovyLoader]
    depends
    : [GroovyLoader]

    commands
    :
      projectgen
    :
        aliases
    : [pg]
        usage
    : /projectgen
    Second plugin.yml
    Code (YAML):
    name: GroovyLoader
    main
    : com.crazyhoorse961.gloader.GroovyLoader
    version
    : 2.5.0-alpha1
    load
    : STARTUP
    Any fix?
     
    #1 crazyhoorse961, May 25, 2017
    Last edited: May 25, 2017
  2. Try removing from GroovyLoader the load: STARTUP
     
  3. Won't help.
    Use only either depends or softdepends per plugin
     
  4. First to try that i just had the depends tag and i had the same issue.
    Stacktrace:
    https://hastebin.com/ixagosexil.sql
     
  5. I know that my plugins work with depend and softdepend - note the missing 's'. I had issues with depends and softdepends (probably just my project at that stage).. However, I may be delusional - it would make sense for there to be support for both.
     
  6. It is far more likely to do with what everyone else is saying. I'll leave my answer but do try the others first.
     
  7. What do you mean?
     
  8. show plugin.yml from that trace
     
  9. Code (YAML):
    name: ProjectGen
    version
    : 1.0.0
    main
    : net.zentya.projectgen.ProjectGen
    depends
    : [GroovyLoader]

    commands
    :
      pg
    :
        aliases
    : [projectgen]
        usage
    : /pg
     
  10. You might want to look at a tutorial first.
    There are three load order tags you can use:
    depend - This will require certain plugin(s) to be loaded and will make your plugin load after those plugins.
    softdepend - This will make your plugin load after certain other plugin(s) - If those are present.
    loadbefore - This will make your plugin load before certain other plugin(s) - If those are present.

    Note that you have to use depend instead of depends and softdepend instead of softdepends.
     
  11. Even using depend tag it causes the same issue
     
  12. Send all plugin.yml files and send console logs
     
  13. Everything is the same, instead of depends i have depend.
     
  14. open the jar. open the plugin.yml
    now open the groovyloader jar and open the plugin.yml
    does it correspond to no S in depend and the name is CaPiTaLlY cOrReCt?
     
  15. Yes.
     
  16. May you post both ymls?
     
  17. GroovyLoader:
    Code (YAML):
    name: GroovyLoader
    main
    : com.crazyhoorse961.gloader.GroovyLoader
    version
    : 2.5.0-alpha1
    load
    : STARTUP
    ProjectGen:
    Code (YAML):
    name: ProjectGen
    version
    : 1.0.0
    main
    : net.zentya.projectgen.ProjectGen
    depend
    : [GroovyLoader]

    commands
    :
      pg
    :
        aliases
    : [projectgen]
        usage
    : /pg
     
  18. I think I suggested this earlier, try removing load: STARTUP