mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Fixed the disaster of packet receive error handling
This commit is contained in:
@ -25,6 +25,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
use pocketmine\network\BadPacketException;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
use pocketmine\network\mcpe\protocol\types\MismatchTransactionData;
|
||||
use pocketmine\network\mcpe\protocol\types\NormalTransactionData;
|
||||
@ -68,7 +69,7 @@ class InventoryTransactionPacket extends DataPacket{
|
||||
$this->trData = new ReleaseItemTransactionData();
|
||||
break;
|
||||
default:
|
||||
throw new \UnexpectedValueException("Unknown transaction type $transactionType");
|
||||
throw new BadPacketException("Unknown transaction type $transactionType");
|
||||
}
|
||||
|
||||
$this->trData->decode($this);
|
||||
|
Reference in New Issue
Block a user