mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 10:49:10 +00:00
Merge pull request #3481 from LouisBHirst/patch-getOnlinePlayers
getOnlinePlayers() only returns the players already connected
This commit is contained in:
commit
885fc07e5c
@ -1809,7 +1809,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$this->setNameTag($this->username);
|
||||
$this->iusername = strtolower($this->username);
|
||||
|
||||
if(count($this->server->getOnlinePlayers()) > $this->server->getMaxPlayers() and $this->kick("disconnectionScreen.serverFull", false)){
|
||||
if(count($this->server->getOnlinePlayers()) >= $this->server->getMaxPlayers() and $this->kick("disconnectionScreen.serverFull", false)){
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user