Silence MovePlayerPacket debug spam

This commit is contained in:
Dylan K. Taylor 2022-01-16 15:40:18 +00:00
parent c221484fc3
commit 33421258b6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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){