Ivan Mishin
Ivan Mishin

Reputation: 14

plugins\Galactifun.jar does not contain a paper-plugin.yml or plugin.yml. Could not determine plugin type, cannot load a plugin from it

I recently forked a Minecraft plugin by the name of Galactifun in order to adapt it to the needs of my server however I realised I couldn't compile it properly.

The plugin uses a gradle plugin called "plugin-yml" which automatically generates a plugin.yml upon compilation.

When I build the project, the plugin.yml appears in the build however I still get an error saying that it does not exist.

When I build the project, the plugin.yml appears in the build

I still get an error saying that it does not exist

I tried:

  1. Removing plugin-yml and using the traditional plugin.yml method and got the same error
  2. Adding paper-plugin.yml using the plugin-yml plugin and got the same error
  3. Tried using both plugin-yml and the traditional plugin.yml file and got an error that there were 2 plugin-yml files upon compilation

My fork on GitHub

Upvotes: 0

Views: 322

Answers (1)

StonedCodingTom
StonedCodingTom

Reputation: 149

When plugin.yml is placed in the resources folder gradle jar should automatically add this to the .jar. My mistake was using build artifacts instead of gradle jar. If you want use artifacts though, you should manually setup artifact preset to add plugin.yml to the .jar also. (Project Structure -> Artifacts -> + to add new artifact with dependencies -> in the artifact preset click + to add file plugin.yml to the artifact).

For sure you need to add this code to the build.gradle:

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('paper-plugin.yml') {
        expand props
    }
}

Upvotes: 0

Related Questions