From 3fb4198210f617b2893f6ae18ac1b04a95f32595 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Fri, 16 Jan 2026 23:48:02 +0300 Subject: [PATCH] fixed small memory leak --- src/Player.php | 5 ++--- src/network/protocol/ProtocolInfo.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Player.php b/src/Player.php index 6e15baf9..e3861235 100755 --- a/src/Player.php +++ b/src/Player.php @@ -2316,7 +2316,7 @@ class Player{ $this->evid[] = $this->server->event("player.pickup", [$this, "eventHandler"]); $this->evid[] = $this->server->event("tile.container.slot", [$this, "eventHandler"]); $this->evid[] = $this->server->event("tile.update", [$this, "eventHandler"]); - $this->server->addHandler("player.invisible", [$this, "invisibilityHandler"]); + $this->evid[] = $this->server->event("player.invisible", [$this, "invisibilityHandler"]); $this->lastMeasure = microtime(true); $this->server->schedule(50, [$this, "measureLag"], [], true); @@ -3521,7 +3521,7 @@ class Player{ } } } - + /** * @return string */ @@ -3562,7 +3562,6 @@ class Player{ * @deprecated 16x16x16 chunk sending was removed */ public static $smallChunks = false; - } class PlayerNull extends Player{ diff --git a/src/network/protocol/ProtocolInfo.php b/src/network/protocol/ProtocolInfo.php index efa7e47e..86dde7ed 100644 --- a/src/network/protocol/ProtocolInfo.php +++ b/src/network/protocol/ProtocolInfo.php @@ -79,4 +79,4 @@ abstract class ProtocolInfo{ */ /***REM_START***/ require_once(FILE_PATH . "src/network/raknet/RakNetDataPacket.php"); -/***REM_END***/ \ No newline at end of file +/***REM_END***/