mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Player: remove dead functions
these functions belong in the network session, and they are currently just proxies for them. In the future we might have players who don't have IPs at all depending on how they connected (for example Specter) so this stuff shouldn't be in here.
This commit is contained in:
@ -849,32 +849,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
parent::sendSkin($targets ?? $this->server->getOnlinePlayers());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the player IP address
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAddress() : string{
|
||||
return $this->networkSession->getIp();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPort() : int{
|
||||
return $this->networkSession->getPort();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last measured latency for this player, in milliseconds. This is measured automatically and reported
|
||||
* back by the network interface.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPing() : int{
|
||||
return $this->networkSession->getPing();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the player is currently using an item (right-click and hold).
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user