mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added API to allow getting player latency
This commit is contained in:
@ -237,6 +237,12 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function updatePing(string $identifier, int $pingMS){
|
||||
if(isset($this->players[$identifier])){
|
||||
$this->players[$identifier]->updatePing($pingMS);
|
||||
}
|
||||
}
|
||||
|
||||
private function getPacket($buffer){
|
||||
$pid = ord($buffer{0});
|
||||
if(($data = PacketPool::getPacketById($pid)) === null){
|
||||
|
Reference in New Issue
Block a user