mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Max players check now works properly
This now includes all connected sessions, whether they are considered online or not.
This commit is contained in:
@ -39,6 +39,7 @@ use raklib\server\ServerHandler;
|
||||
use raklib\server\ServerInstance;
|
||||
use raklib\utils\InternetAddress;
|
||||
use function addcslashes;
|
||||
use function count;
|
||||
use function implode;
|
||||
use function rtrim;
|
||||
use function spl_object_hash;
|
||||
@ -99,6 +100,10 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
$this->rakLib->start(PTHREADS_INHERIT_CONSTANTS); //HACK: MainLogger needs constants for exception logging
|
||||
}
|
||||
|
||||
public function getConnectionCount() : int{
|
||||
return count($this->sessions);
|
||||
}
|
||||
|
||||
public function setNetwork(Network $network) : void{
|
||||
$this->network = $network;
|
||||
}
|
||||
|
Reference in New Issue
Block a user