mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Trying update core to PHP 7.4.21
This commit is contained in:
parent
e74e6c3f77
commit
1a884f6d2a
12 changed files with 80 additions and 79 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue