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

@ -19,11 +19,6 @@
*
*/
class PlayerNull extends Player{
public function __construct(){
}
}
class Player{
private $server;
private $recoveryQueue = array();
@ -710,7 +705,7 @@ class Player{
if(preg_match_all('#@([@A-Za-z_]{1,})#', $m, $matches, PREG_OFFSET_CAPTURE) > 0){
$offsetshift = 0;
foreach($matches[1] as $selector){
if($selector[0]{0} === "@"){ //Escape!
if($selector[0][0] === "@"){ //Escape!
$m = substr_replace($m, $selector[0], $selector[1] + $offsetshift - 1, strlen($selector[0]) + 1);
--$offsetshift;
continue;
@ -1163,7 +1158,7 @@ class Player{
case ProtocolInfo::REQUEST_CHUNK_PACKET:
case ProtocolInfo::ANIMATE_PACKET:
case ProtocolInfo::SET_HEALTH_PACKET:
continue;
continue 2;
}
}
$this->received[$p->messageIndex] = true;
@ -2088,7 +2083,7 @@ class Player{
$this->toCraft = array();
if(trim($packet->message) != "" and strlen($packet->message) <= 255){
$message = $packet->message;
if($message{0} === "/"){ //Command
if($message[0] === "/"){ //Command
if($this instanceof Player){
console("[DEBUG] ".FORMAT_AQUA.$this->username.FORMAT_RESET." issued server command: ".$message);
}else{
@ -2507,3 +2502,9 @@ class Player{
}
}
class PlayerNull extends Player{
public function __construct(){
}
}