1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Limiting how many players in a world

Discussion in 'Development' started by Theo gillespie, Nov 14, 2017.

  1. Theo gillespie

    Theo gillespie Spider

    Messages:
    13
    How do you limit how many players in a world?
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you can check level->getplayers and count that, if it's over limit block it entering there
     
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Do you mean the total players on the server (default world) or in a specific world?
     
  4. Theo gillespie

    Theo gillespie Spider

    Messages:
    13
    In a specific world (lobby)
     
  5. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Use EntityLevelChangeEvent, and if has some count of players then kick or cancel that event to the player.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.