mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added handling for unknown packets
This commit is contained in:
@ -174,6 +174,7 @@ use pocketmine\network\mcpe\protocol\StartGamePacket;
|
||||
use pocketmine\network\mcpe\protocol\TakeItemEntityPacket;
|
||||
use pocketmine\network\mcpe\protocol\TextPacket;
|
||||
use pocketmine\network\mcpe\protocol\TransferPacket;
|
||||
use pocketmine\network\mcpe\protocol\UnknownPacket;
|
||||
use pocketmine\network\mcpe\protocol\UpdateAttributesPacket;
|
||||
use pocketmine\network\mcpe\protocol\UpdateBlockPacket;
|
||||
use pocketmine\network\mcpe\protocol\UseItemPacket;
|
||||
@ -3258,12 +3259,13 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
return false;
|
||||
}
|
||||
|
||||
public function handleUnknown(UnknownPacket $packet) : bool{
|
||||
$this->server->getLogger()->debug("Received unknown packet from " . $this->getName() . ": 0x" . bin2hex($packet->payload));
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a Minecraft packet
|
||||
* TODO: Separate all of this in handlers
|
||||
*
|
||||
* WARNING: Do not use this, it's only for internal use.
|
||||
* Changes to this function won't be recorded on the version.
|
||||
* TODO: get rid of these remains, fix DataPacketReceiveEvent, fix timings
|
||||
*
|
||||
* @param DataPacket $packet
|
||||
*/
|
||||
|
Reference in New Issue
Block a user