From 33421258b604bd8f9ec6b55168ccfc3329de8ffc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 16 Jan 2022 15:40:18 +0000 Subject: [PATCH] Silence MovePlayerPacket debug spam --- src/network/mcpe/handler/InGamePacketHandler.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index bed549378..de74046ee 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -73,6 +73,7 @@ use pocketmine\network\mcpe\protocol\MapInfoRequestPacket; use pocketmine\network\mcpe\protocol\MobArmorEquipmentPacket; use pocketmine\network\mcpe\protocol\MobEquipmentPacket; use pocketmine\network\mcpe\protocol\ModalFormResponsePacket; +use pocketmine\network\mcpe\protocol\MovePlayerPacket; use pocketmine\network\mcpe\protocol\NetworkStackLatencyPacket; use pocketmine\network\mcpe\protocol\PlayerActionPacket; use pocketmine\network\mcpe\protocol\PlayerAuthInputPacket; @@ -174,6 +175,12 @@ class InGamePacketHandler extends PacketHandler{ return null; } + public function handleMovePlayer(MovePlayerPacket $packet) : bool{ + //The client sends this every time it lands on the ground, even when using PlayerAuthInputPacket. + //Silence the debug spam that this causes. + return true; + } + public function handlePlayerAuthInput(PlayerAuthInputPacket $packet) : bool{ $rawPos = $packet->getPosition(); foreach([$rawPos->x, $rawPos->y, $rawPos->z, $packet->getYaw(), $packet->getHeadYaw(), $packet->getPitch()] as $float){