Dynamic Player World Count

Discussion in 'Plugin Development' started by MrFrozen, Jul 12, 2015.

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

    MrFrozen

    Hey bukkit,

    I was wondering how I can get track of joining and leaving players in diffrent worlds.
    Can anyone help me out with this?
     
  2. Offline

    1Rogue

    Listen to the PlayerChangedWorldEvent
     
  3. Offline

    RainoBoy97

    Based on your title I think World#getPlayers and List#size should solve your problem :)
     
  4. Offline

    MrFrozen

    How to you mean World#getPlayers and List#size....
     
  5. Offline

    Zombie_Striker

    @MrFrozen
    What he means is you take your world (World) and use the method #getPlayers(). Then the List would store how many players are in a specific world. If you want to see what world the players on your server are on, you would use Maps (That way you can store the UUID of the player and which world they are in). Then again, you can always use World#getPlayers() to see all the players in a world, that way you don't need to store/ update anything.
     
Thread Status:
Not open for further replies.

Share This Page