Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using QueryRegenerateEvent to create custom max-players count

Comments in 'Resources' started by MrGenga, Sep 30, 2015.

  1. MrGenga
    Offline

    MrGenga Active Member

    Joined:
    Jul 24, 2015
    Posts:
    75
    Minecraft User:
    MrGenga
    Hello! I want to tall you, how to create custom max-players count. Is the visual effect, not real. Example: you create 16777216 fake slots, but join to your server can only 20 players. Here is the screenshot. Screenshot_2015-09-29-20-09-58.png Continue. You can use QueryRegenerateEvent and his method: QueryRegenerateEvent::setMaxPlayerCount(int $count)
    Example:
    Code:
    public function onQuery(QueryRegenerateEvent $ev) {
    $event->setMaxPlayerCount(16777216);
    }
    
    Thanks for reading! ;)

Share This Page

Advertisement