diff --git a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php index 785528c69..4b0f07288 100644 --- a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php +++ b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php @@ -118,6 +118,8 @@ class NetworkInventoryAction{ break; } break; + default: + throw new \UnexpectedValueException("Unknown inventory action source type $this->sourceType"); } $this->inventorySlot = $packet->getUnsignedVarInt(); @@ -145,6 +147,8 @@ class NetworkInventoryAction{ case self::SOURCE_TODO: $packet->putVarInt($this->windowId); break; + default: + throw new \UnexpectedValueException("Unknown inventory action source type $this->sourceType"); } $packet->putUnsignedVarInt($this->inventorySlot);