How is this possible?

Discussion in 'Spigot Plugin Development' started by Eliminator, Jun 7, 2016.

  1. I am getting this: java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;

    When I run this code:
    Code (Text):
            private boolean onlineJudges(){
                for(Player p : getServer().getOnlinePlayers())
                        return true;
                return false;
    How is it possible that it is saying that?
  2. Are you using the same version of the bukkit API as you are running the server with?
  3. You're building against the 1.7 API (Which used an array of Players for Server#getOnlinePlayers(). Update to a more recent version of the API, or downgrade the version of CraftBukkit available at runtime and it will solve itself