My plugin is working on my local server, but not on Multicraft

Discussion in 'Plugin Development' started by icc, May 6, 2020.

  1. Offline


    I'm trying to upload my plugin to a multicraft server and it won't work. The plugin works fine on my locally hosted server, and there are no errors in my console (it's acting like my plugin just doesn't exist). I've uploaded other people's plugins like this, and they all work. I don't know what I'm doing wrong.

    I simplified my code as much as possible. Now it's literally just a command to heal the player. That doesn't work, either.

    Here's my (super simplified) code:

    Main class:

    package me.icc.pluginTest;
    import org.bukkit.ChatColor;
    import org.bukkit.event.Listener;
    import me.icc.pluginTest.commands.Commands;
    public class main extends JavaPlugin implements Listener {
        public void onEnable() {
            Commands commands = new Commands();
            getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "\n\nPlugin1 enabled!");
        public void onDisable() {
            getServer().getConsoleSender().sendMessage(ChatColor.RED + "\n\nPlugin1 closed!");
    Commands class:

    package me.icc.pluginTest.commands;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import me.icc.pluginTest.main;
    public class Commands implements Listener, CommandExecutor {
        public String cmd1 = "resethealth";
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            Player player = (Player) sender;
            if(sender instanceof Player) {
                if (cmd.getName().equalsIgnoreCase(cmd1)) {
                    return true;
            return false;
  2. Offline

    timtower Moderator Moderator

  3. Offline


    Here's the specific error:

    java.lang.UnsupportedClassVersionError: me/icc/pluginTest/Main has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

    But in my terminal window, when I type java -version:

    java version "13.0.2"2020-01-14Java(TM) SE RuntimeEnvironment(build 13.0.2+8)JavaHotSpot(TM)64-BitServer VM (build 13.0.2+8, mixed mode, sharing)

    And I thought Java 13 was v57. From what I see my JRE matches my Java version. I don't know much about compiler errors.

    Here's the full pastebin:
  4. Offline

    timtower Moderator Moderator

    @icc What java version are you using to compile?
  5. Offline


    The poject was compiled with Java 10 but the machine runs Java 8, hence an UnsupportedClassVersionError. You have to compile with Java 8 (or eariler).

Share This Page