mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
RakLibInterface: Remove useless function
This commit is contained in:
parent
61fc090cf2
commit
08daf655e5
@ -145,7 +145,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
|||||||
$address = $this->players[$identifier]->getAddress();
|
$address = $this->players[$identifier]->getAddress();
|
||||||
try{
|
try{
|
||||||
if($packet->buffer !== ""){
|
if($packet->buffer !== ""){
|
||||||
$pk = $this->getPacket($packet->buffer);
|
$pk = PacketPool::getPacket($packet->buffer);
|
||||||
$this->players[$identifier]->handleDataPacket($pk);
|
$this->players[$identifier]->handleDataPacket($pk);
|
||||||
}
|
}
|
||||||
}catch(\Throwable $e){
|
}catch(\Throwable $e){
|
||||||
@ -248,14 +248,4 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
|||||||
$this->players[$identifier]->updatePing($pingMS);
|
$this->players[$identifier]->updatePing($pingMS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getPacket($buffer){
|
|
||||||
$pid = ord($buffer{0});
|
|
||||||
if(($data = PacketPool::getPacketById($pid)) === null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$data->setBuffer($buffer, 1);
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user