mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +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:
@ -77,6 +77,14 @@ class Network{
|
||||
return $this->interfaces;
|
||||
}
|
||||
|
||||
public function getConnectionCount() : int{
|
||||
$count = 0;
|
||||
foreach($this->interfaces as $interface){
|
||||
$count += $interface->getConnectionCount();
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function tick() : void{
|
||||
foreach($this->interfaces as $interface){
|
||||
$interface->tick();
|
||||
|
Reference in New Issue
Block a user