mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
NetworkSession->getPing() now returns null when no measurement of ping has yet been completed
This commit is contained in:
parent
1d9cb174b6
commit
d3a6da1b3a
@ -117,8 +117,8 @@ class NetworkSession{
|
||||
private $port;
|
||||
/** @var PlayerInfo */
|
||||
private $info;
|
||||
/** @var int */
|
||||
private $ping;
|
||||
/** @var int|null */
|
||||
private $ping = null;
|
||||
|
||||
/** @var PacketHandler */
|
||||
private $handler;
|
||||
@ -235,9 +235,9 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last recorded ping measurement for this session, in milliseconds.
|
||||
* Returns the last recorded ping measurement for this session, in milliseconds, or null if a ping measurement has not yet been recorded.
|
||||
*/
|
||||
public function getPing() : int{
|
||||
public function getPing() : ?int{
|
||||
return $this->ping;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user