Trying update core to PHP 7.4.21

This commit is contained in:
ArkQuark 2022-06-16 16:47:49 +03:00
parent e74e6c3f77
commit 1a884f6d2a
12 changed files with 80 additions and 79 deletions

View file

@ -54,7 +54,7 @@ class MinecraftInterface{
}
private function parsePacket($buffer, $source, $port){
$pid = ord($buffer{0});
$pid = ord($buffer[0]);
if(RakNetInfo::isValid($pid)){
$parser = new RakNetParser($buffer);
@ -67,7 +67,7 @@ class MinecraftInterface{
return $parser->packet;
}
return false;
}elseif($pid === 0xfe and $buffer{1} === "\xfd" and ServerAPI::request()->api->query instanceof QueryHandler){
}elseif($pid === 0xfe and $buffer[1] === "\xfd" and ServerAPI::request()->api->query instanceof QueryHandler){
$packet = new QueryPacket;
$packet->ip = $source;
$packet->port = $port;

View file

@ -28,7 +28,7 @@ class QueryPacket extends Packet{
public $payload;
public function decode(){
$this->packetType = ord($this->buffer{2});
$this->packetType = ord($this->buffer[2]);
$this->sessionID = Utils::readInt(substr($this->buffer, 3, 4));
$this->payload = substr($this->buffer, 7);
}