Solved PlayerQuitEvent - player count

Discussion in 'Plugin Development' started by MCMastery, Jun 23, 2016.

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

    MCMastery

    Ok, this is a really quick and simple question.
    I want to get the number of players online.
    Currently I use:
    Code:
    Bukkit.getOnlinePlayers().size()
    So... is it true that the player is removed from getOnlinePlayers() AFTER the PlayerQuitEvent is triggered? It seems this way, but I want to make sure.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @MCMastery Put it on a localhost server.
    Let it print out the amount.
    Join
    Leave.
     
  3. Offline

    MCMastery

    @timtower ok I don't know what answer I was expecting. I guess I'm tired. thanks :p

    The answer is
    [​IMG]
     
    timtower likes this.
  4. Offline

    Zombie_Striker

    @MCMastery
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page