Error -> Could not load 'plugins\PluginsMe2.0.jar' in folder 'plugins'

Discussion in 'Plugin Development' started by Eugeen, Apr 30, 2022.

  1. Offline

    Eugeen

    Main class
    Code:
    package ewoplugPackage;
    
    import org.bukkit.Bukkit;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin  {
        public void onEnable() {
            Bukkit.getLogger().info("Hello. My names REEEEEMBOO");
        }
      
        public void onDisable() {
            Bukkit.getLogger().info("Im bye back");
        }
    
    }
    File plugin.yml

    Code:
    name: EwoPlug
    main: ewoplugPackage.Main
    version: 1.0.0
    authors: [TaiDulloLa]
    Error

    Code:
    [09:23:28] [Server thread/WARN]: Legacy plugin EwoPlug v1.0.0 does not specify an api-version.
    [09:23:28] [Server thread/ERROR]: Could not load 'plugins\PluginsMe2.0.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: ewoplugPackage/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:149) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:409) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:233) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[spigot-1.17.1(1).jar:3284a-Spigot-3892929-0ab8487]
            at java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: java.lang.UnsupportedClassVersionError: ewoplugPackage/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
     
    Last edited by a moderator: Apr 30, 2022
  2. Offline

    timtower Administrator Administrator Moderator

    @Eugeen Your compiler is using a newer java than your server is running.
     

Share This Page