Solved New to IntelliJ > Doesn't build jar plugin.yml

Discussion in 'Spigot Plugin Development' started by Enderaura, Jun 12, 2017.

Thread Status:
Not open for further replies.
  1. So today I swtched from eclipse to intellij, just getting used to it. I finally managed to export my jar, but on starting my test server, it gave me an error about it not containing a plugin.yml altough I had one in eclipse.

    [​IMG]


    Code (Text):
    [19:12:16 ERROR]: Could not load 'plugins\HCF CORE.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
      at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:154) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.ja
    va:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.jav
    a:198) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java
    :525) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
      ... 6 more
     
  2. You should go to File > Project Structure > Artifacts and then click the green plus button > File and then search for the plugin.yml
     
    • Agree Agree x 1
    • Winner Winner x 1
  3. You need to include it in your artifact.
     
  4. https://xenderaura.gyazo.com/709c36a6dfb040615b3bd341bf171bae I did it like this? but now I get this error:

    Code (Text):

    [19:21:03 ERROR]: Could not load 'plugins\HCF CORE.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ExceptionInInitializerError
      at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:135) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:329) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:251) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.ja
    va:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.jav
    a:198) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java
    :525) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
    Caused by: java.lang.ExceptionInInitializerError
      at com.enderqura.hcf.Main.<init>(Main.java:15) ~[?:?]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     ~[?:1.8.0_101]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     ~[?:1.8.0_101]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce) ~[?:1.8.0_101]
      at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_1
    01]
      at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_101]
      at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:76) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      ... 6 more
    Caused by: java.lang.NullPointerException
      at com.enderqura.hcf.HCFScoreboard.<init>(HCFScoreboard.java:22) ~[?:?]
      at com.enderqura.hcf.HCFScoreboard.<clinit>(HCFScoreboard.java:24) ~[?:?
    ]
      at com.enderqura.hcf.Main.<init>(Main.java:15) ~[?:?]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     ~[?:1.8.0_101]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     ~[?:1.8.0_101]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce) ~[?:1.8.0_101]
      at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_1
    01]
      at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_101]
      at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:76) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
      ... 6 more
     
    I don't think it's an issue with the code as it worked fine when exporting from eclipse.
     
  5. Mas

    Mas

    • Like Like x 1
  6. Welp, I missed that, I fixed it now.
     
Thread Status:
Not open for further replies.