Merge pull request #3481 from LouisBHirst/patch-getOnlinePlayers

getOnlinePlayers() only returns the players already connected
This commit is contained in:
Shoghi Cervantes 2015-09-13 21:01:51 +02:00
commit 885fc07e5c

View File

@ -1809,7 +1809,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->setNameTag($this->username); $this->setNameTag($this->username);
$this->iusername = strtolower($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; break;
} }