๐ฑ Inventories
Root commands: /inventory, /invsee, /cmi inv, /playerdata
Worlds: Spawn, Overworld, Underworld-A, Underworld-B, Pit
Access Level: Admin
When accessing the inventory of a player, the proper command to use depends if the player is online or offline. Any time you need to access the inventory of a player, always use /find <player> to confirm whether they are online or offline (and if online, what server they are on).
[!WARNING]
Commands specified for online players are not blocked when the player is offline. However, when they log back on, their inventory will sync from the database and overwrite any changes, meaning items will be duped/lost. Offline players must only be edited using the offline commands.
Accessing Player Inventory (Online)
Two commands work for accessing inventories while online (make sure you are in the same world as them while running these):
/invsee <name>/cmi inv <name>
/invsee will only let you see their 36 inventory slots (no armour/offhand), but is easier to use.
/cmi inv lets you see their entire inventory, equipped armour, offhand, potion effects, and last location.
- Offline Use Warning: This command technically works when the player is offline, but it will dupe items if used to edit their inventory (looking/inspecting without touching is fine).
- Per-World Limitation: This command only works PER-WORLD due to database synchronization. If you edit something in one world, it may not reflect the same inventory in another world. Use this command in the specific world the player is currently in.
Prefer the /invsee command when you don't need to access the player's offhand or armour.
Accessing Player Inventory (Offline)
/inventory <name>
Do not use this command if the player is online, it will likely duplicate or otherwise break their data! Check if they are online in any world with /find playername - you should receive a That user is not online message.
Accessing Player Inventory Saves
Inventories are periodically saved in PlayerData. They can be useful to reference if you want to see a player's inventory at a given point in time, for instance when tracking down a lost/bugged item. However, there is no guarantee that a save occurred at a specific point in time, so do not rely on this to always provide you with what you need.
To access a player's data saves, simply use the command /playerdata list <player>. From there, you can click on a specific player data save, which opens a new menu. You can then click on the inventory button to view the inventory of the player at the data save.