mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +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();
|
||||
try{
|
||||
if($packet->buffer !== ""){
|
||||
$pk = $this->getPacket($packet->buffer);
|
||||
$pk = PacketPool::getPacket($packet->buffer);
|
||||
$this->players[$identifier]->handleDataPacket($pk);
|
||||
}
|
||||
}catch(\Throwable $e){
|
||||
@ -248,14 +248,4 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
$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