require your inventory to have at least 1 empty slot in order to be allowed to click buy/sell at a trade portal or shop. (Unless ure buying a similar item that already has a partial stack) A full inventory would result in a greyed out button and prompt.
In vanilla world: Stops your bought items from dropping when you didn’t notice your inventory is full, so other people won’t be able to steal your things or pick it up by accident when they walk past
Creative world: Prevents greifers from clicking the buy button faster than the speed I fall asleep in class and causing lag
I haven’t been reading suggestions much so idk if people posted this recently