If I export a self-written Minecraft plugin to eclipse and put it in the plugins folder on the server, an error message appears there (picture in the attachment.
Caused by: java.lang.UnsupportedClassVersionError: de / fabian / info / Info has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
the plugin.yml:
name: info
author: DutyBoyYT
version: 1.0
main: de.fabian.info.Info
Class:
package de.fabian.info;
import org.bukkit.plugin.java.JavaPlugin;
public class Info extends JavaPlugin {
@Override
public void onEnable () {
System.out.println ("§7 [Info] Plugin successfully activated!");
}
@Override
public void onDisable () {
System.out.println ("§7 [Info] Plugin successfully deactivated!");
}
}
I have properties spigot-1.8.8.
What do I have to do so that I can use the plugin or what do I have to change?
Error message
Your plugin is written in Java 13 but Java 8 is running on your server. That is the problem
How can i fix this?
Update java on the server or compile your plugin with Java 8
But that has nothing to do with the Spigot version or?
No only with Java
I updated java now but it still doesn't work
https://www.baeldung.com/eclipse-change-java-version because set your Java version to 8
Install the Java 8 JDK / SDK and select it for the project.
Respectively. Simply select Java 8.
If you don't need it you can compile for lower versions even if you only have Jdk13 installed
All right, I didn't know that.
Thank you almost everything now but with me there's only:
This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
I have the Spigot 1.8.8 file on my localhost server
The spigot file on your server (git-Spigot-db6de12-18fbb24) is not the same as the one you implement in your plugin (1.8.8-R0.1-SNAPSHOT)
Solutions:
Upload the version you are implementing to the server.
or
Download and implement the version of your server. (Better you are currently implementing Ron Snapshot version)
Thank you almost everything now but with me there's only:
This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
I have the Spigot 1.8.8 file on my localhost server
Thank you almost everything now but with me there's only:
This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
I have the Spigot 1.8.8 file on my localhost server
This is only a piece of information and not a mistake sure that it is not?
Achso but with System.out.println it is shown net in the console
You have to download the Java again
and delete the old Java version in Control Panel and Programs