Inventory management and sorting

I’ve been working on my multiplayer sandbox game fairly well so far but I don’t know how to correctly handle inventory.

Inventory includes each player’s inventory and all the other inventories in blocks (like a chest, for example). The issue in particular is the sorting. Sorting in my case means when a player can click and item, put it “on their cursor”, and move it somewhere else, like Minecraft. Other players would have to be updated too if they’re looking at the chest.

What I had in mind was inventory was all server side but copies of the inventory were sent to the player (includes chests, etc). The player could look in a chest, sort their inventory and the chest’s inventory, and then changes would be sent to the server. However, if another player were to look at the same chest and change it, the new changes wouldn’t be reflected back on the first player’s screen, and their changes would override the other.

I looked into how Minecraft handles it and it’s fully server-side. The client sends packets whenever a client clicks on a slot and the server does the rest. I am leaning a bit towards this idea, but I’m wondering if there are any other better/more preferred options.

Thanks!