Solved getOnlinePlayers problem

Discussion in 'Plugin Help/Development/Requests' started by roygator14, Dec 10, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Hey, So I am creating a plugin for a friend, and I am telling the command to getOnlinePlayers() , when I put "getOnlinePlayers" the code sends a line through it, and I can't figure out why:
    for (Player playerToWarn : Bukkit.getServer().getOnlinePlayers()){
    (It may not show in this, however "getOnlinePlayers" has a line through it.)
  2. Offline

    Mrs. bwfctower

  3. Offline


    Which Java/Spigot/Bukkit Build are you using because i never seen getonlineplayers crossed out :confused:
  4. Offline


    It might be deprecated. Much stuff In the Bukkit API are deprecated. Use the Spigot API for 1.8 if you don't already.
  5. Offline


    I'm using Spigot 1.8 (File name is Spigot18.jar)

    Spigot 1.8, and yes it is deprecated
    I am not sure if I could be using the wrong version of SpigotAPI 1.8 though? Maybe I have an old download, Could you link me to the correct one?
  6. Offline


    Here check this link out. Go to post #3
  7. Offline


  8. Offline

    timtower Moderator Moderator

    It gets made using the exact same thing.
  9. Offline


    Look for Spigot 1.8.7 or 1.8.8 jar depending what u prefer and what your servers spigot usage is, but again i never seen getonlineplayers deprecated so might be old idk
  10. Offline


    I have Spigot1.8.jar , which is what my server is using, and none of the other plugins have gotten deprecated, so I have no clue what happened.

    EDIT: Just reinstalled the new Spigot 1.8.8.jar file. The code works now, Thanks everyone!
    Last edited: Dec 12, 2015
Thread Status:
Not open for further replies.

Share This Page