mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
RakLibInterface: Use NetworkSession API for getting IP instead of Player
soon the network interfaces won't be dealing with Players at all.
This commit is contained in:
parent
ca1a0c8643
commit
b93318b2cf
@ -144,7 +144,7 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
public function handleEncapsulated(string $identifier, EncapsulatedPacket $packet, int $flags) : void{
|
||||
if(isset($this->players[$identifier])){
|
||||
//get this now for blocking in case the player was closed before the exception was raised
|
||||
$address = $this->players[$identifier]->getAddress();
|
||||
$address = $this->players[$identifier]->getNetworkSession()->getIp();
|
||||
try{
|
||||
if($packet->buffer !== "" and $packet->buffer{0} === self::MCPE_RAKNET_PACKET_ID){ //Batch
|
||||
$this->players[$identifier]->getNetworkSession()->handleEncoded(substr($packet->buffer, 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user