mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Add restrictions on packet send directions with interfaces
This prevents plugins sending wrong packets at the compiler level (or would, if we had a compiler). It's more robust than a getter for client/server and throwing an exception since a static analysis tool can detect faults created by sending wrong packets from the server. This is also used to deny service to dodgy clients which send wrong packets to the server to attack it.
This commit is contained in:
@ -29,7 +29,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
use function count;
|
||||
|
||||
class InventoryContentPacket extends DataPacket{
|
||||
class InventoryContentPacket extends DataPacket implements ClientboundPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::INVENTORY_CONTENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
|
Reference in New Issue
Block a user