Error with plugin.yml

Discussion in 'Spigot Plugin Help' started by SpyingBadge2143, Jun 27, 2021.

  1. I must be dumb but is this plugin.yml correct?

    Error:

    Code (Java):
    [13:32:05 ERROR]: Could not load 'plugins\HeartEveryBlock.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:170) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:360) ~[patched_1.15.2.jar:git-Paper-391]
            at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-391]
            at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:909) ~[patched_1.15.2.jar:git-Paper-391]
            at java.lang.Thread.run(Thread.java:832) [?:?]
    Caused by: java.util.zip.ZipException: zip END header not found
            at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1482) ~[?:?]
            at java.util.zip.ZipFile$Source.findEND(ZipFile.java:1383) ~[?:?]
            at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1390) ~[?:?]
            at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1221) ~[?:?]
            at java.util.zip.ZipFile$Source.get(ZipFile.java:1184) ~[?:?]
            at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718) ~[?:?]
            at java.util.zip.ZipFile.<init>(ZipFile.java:238) ~[?:?]
            at java.util.zip.ZipFile.<init>(ZipFile.java:168) ~[?:?]
            at java.util.jar.JarFile.<init>(JarFile.java:345) ~[?:?]
            at java.util.jar.JarFile.<init>(JarFile.java:316) ~[?:?]
            at java.util.jar.JarFile.<init>(JarFile.java:282) ~[?:?]
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:158) ~[patched_1.15.2.jar:git-Paper-391]
            ... 5 more

    Plugin.yml:



    main: com.spyingbadge2143.HeartEveryBlock.Main
    name: HeartEveryBlock
    version: 1.0
     
  2. You don't have a description in your plugin.yml
     
    • Agree Agree x 1
  3. Still a error
    Code (Java):
    [15:37:42 ERROR]: Could not load 'plugins\GainAHeartEveryBlock.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/spyingbadge2143/HeartEveryBlock/Main has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 58.0
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:141) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:360) ~[patched_1.15.2.jar:git-Paper-391]
            at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-391]
            at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:909) ~[patched_1.15.2.jar:git-Paper-391]
            at java.lang.Thread.run(Thread.java:832) [?:?]
    Caused by: java.lang.UnsupportedClassVersionError: com/spyingbadge2143/HeartEveryBlock/Main has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 58.0
            at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
            at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) ~[?:?]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:167) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:216) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:111) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[patched_1.15.2.jar:git-Paper-391]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
            at java.lang.Class.forName0(Native Method) ~[?:?]
            at java.lang.Class.forName(Class.java:427) ~[?:?]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:68) ~[patched_1.15.2.jar:git-Paper-391]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[patched_1.15.2.jar:git-Paper-391]
            ... 6 more
     
  4. You're using a too frequent version. https://www.spigotmc.org/threads/unsupported-class-version-error.162284/ This thread can possibly help you. :)
     
  5. Forgot about changing the java version while making the plugin xD thanks.
     
  6. :p, hopefully, it works now!