load startup dependency fail

Discussion in 'Spigot Plugin Development' started by dazoe, May 26, 2018.

  1. Is this intended behavior?


    The plugin.yml files...
    Code (YAML):
    name: PluginA
    author
    : dazoe
    version
    : 0
    main
    : dazoe.PluginA
    load
    : STARTUP
    depend
    : [PluginB]
    Code (YAML):
    name: PluginB
    author
    : dazoe
    version
    : 0
    main
    : dazoe.PluginB
    ServerOutput:
    Code (Text):
    [20:46:45 INFO]: [PluginB] Loading PluginB v0
    [20:46:45 INFO]: [PluginB] onLoad
    [20:46:45 INFO]: [PluginA] Loading PluginA v0
    [20:46:45 INFO]: [PluginA] onLoad
    [20:46:45 INFO]: [PluginA] Enabling PluginA v0
    [20:46:45 INFO]: [PluginA] onEnable
    ... many lines omitted ...
    [20:46:48 INFO]: [PluginB] Enabling PluginB v0
    [20:46:48 INFO]: [PluginB] onEnable
    PluginA depends on PluginB, PluginB is loaded before PluginA but PluginA is enabled before PluginB. This is due to the load: STARTUP option being in PluginA's plugin.yml. I can work around this problem by including load:STARTUP in PluginB's plugin.yml.
     
  2. Not sure if this could fix it but there is a thing called "load before"
    Code (Text):

    loadbefore: [OnePlugin, AnotherPlugin]
     
    Source: https://bukkit.gamepedia.com/Plugin_YAML