Activate plugin error (this version of the Java Runtime only recognizes class file versions up to 52.0)?

Ru
- in Plugins
1

I recently started programming my Minecraft plugins with IntelliJ instead of the Eclipse IDE. I wanted to export my first plugin, but this error appears in the Knsole: org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: de / tresson / skypvp / Main has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Does anyone know how to fix this error?

Ap

You have to compile your plugin with Java 8.