Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6914

loadbefore tag not being recognized when loading classes from other plugin jars.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • None
    • This server is running CraftBukkit version 3390-Spigot-71b293b-a1b1dc8 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT)
    • Yes

      This bug report is a continuation of this [forum post|https://www.spigotmc.org/threads/loadbefore-tag-not-being-recognized-in-pluin-yml.543369/|https://www.spigotmc.org/threads/loadbefore-tag-not-being-recognized-in-pluin-yml.543369/].], but I'll try to include all of the important information from there here.

       

      I have two plugins called TestMainPlugin and TestSubPlugin. TestSubPlugin states TestMainPlugin as a loadbefore in it's plugin.yml, like so:

      [Code] (YAML):
      name: TestSubPlugin
      version: 1.0.0
      author: willkroboth
      main: me.willkroboth.TestSubPlugin.TestSubPlugin
      api-version: 1.18
      loadbefore:

      • TestMainPlugin

      [\Code]

      Here's MainPlugin's plugin.yml aswell:

      [Code] (YAML):
      name: TestMainPlugin
      version: 1.0.0
      author: willkroboth
      main: me.willkroboth.TestMainPlugin.TestMainPlugin

      api-version: 1.18

      [\Code]

      However, when I run a server with both plugins I get this warning in the terminal:
      [Server thread/WARN]: [TestSubPlugin] Loaded class me.willkroboth.TestMainPlugin.TestMainPlugin from TestMainPlugin v1.0.0 which is not a depend, softdepend or loadbefore of this plugin.

      I've noticed that TestSubPlugin is still loading before TestMainPlugin, it just doesn't recognize that when trying to load the class.
       
      Summary:
      Even though I put loadbefore: TestMainPlugin in TestSubPlugin's plugin.yml, a warning saying that TestMainPlugin is not a loadbefore of TestSubPlugin appears when loading a class from TestMainPlugin's jar file
       
      You can find the two jar files for my test plugins attached below, and my Intellij project files here.

            Unassigned Unassigned
            WillKroboth Will Kroboth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: