1
Inventory swap?
anyone know the easiest/simplest way to swap 2 players' inventories?
Create an account or sign in to comment.
1
3
One way would be to use the shulker box trick. You copy the inventories to shulker boxes, and then alter the loot table of the shulker boxes to drop their contents when mined, which means you can use the loot command to give a player the loot from them (downside is it won't keep the right slots). It's a bit complicated, here's a better explanation/tutorial:
https://www.reddit.com/r/MinecraftCommands/wiki/questions/modifyinventory/
Alternatively you could copy the players' inventories to storage, and then iterate through the inventory lists to give each item using the /item command and macros.
Unfortunately all methods are a bit tricky, if you're unsure I'd recommend getting some closer help from someone, for example from the Minecraft Commands discord or Datapack Hub.
https://www.reddit.com/r/MinecraftCommands/wiki/questions/modifyinventory/
Alternatively you could copy the players' inventories to storage, and then iterate through the inventory lists to give each item using the /item command and macros.
Unfortunately all methods are a bit tricky, if you're unsure I'd recommend getting some closer help from someone, for example from the Minecraft Commands discord or Datapack Hub.