Slots Plugin help

Discussion in 'Spigot Plugin Help' started by Krzychu997, Apr 25, 2017.

  1. Hello, I'm polish.

    I'm editing plugin on 1.7.10

    1st error:
    Collection<? extends Player> pList = Bukkit.getOnlinePlayers();

    2st error:

    Duplicate local variable len
  2. Please post your code on pastebin or something like that, this is unreadable
  3. Use a code block or hastebin please.
  4. Code (Text):
    Collection<? extends Player> pList = Bukkit.getOnlinePlayers();
                if ((pList != null) && (pList.size() >= Bukkit.getMaxPlayers())) {
    getOnlinePlayers is deprecated
  5. You can still use deprecated methods without any problem but they will probably be removed in a future release of Spigot.
  6. I don't know, thats the only thing I saw wrong with it.
  7. Try to remove "? extends" or change the Collection to a Player[]
  8. Won't make any difference, Spigot just adds more methods.
    • Agree Agree x 1
  9. What he said
    • Like Like x 1
  10. For getOnlinePlayers?
  11. @DynamicThijs
    This method
    did not work
  12. Does it give an error? What DOES it do?