ClearPlayerInventory

ClearPlayerInventory command

Empties the given player's (<PlayerID>) main inventory, equipped items, and/or slot items, controlled by the <ClearInventory>, <ClearSlotItems>, and <ClearEquippedItems> flags.

Argument information
  • <Player ID>type: number

    The numeric in-game player ID of the target player (not their Steam ID).

  • <Clear Inventory>type: boolean

    1 to clear the player's inventory, 0 to leave it.

  • <Clear Slot Items>type: boolean

    1 to clear the player's hotbar slots, 0 to leave them.

  • <Clear Equipped Items>type: boolean

    1 to clear the player's equipped items, 0 to leave them.

Command builder

Player ID
Clear Inventory
Clear Slot Items
Clear Equipped Items

Examples

This console command empties the main inventory (1) and equipped items (1) of the player with ID 429083, while leaving their slot items untouched (0).

Using cheats on a server

On a multiplayer server, authenticate first with enablecheats <password>, and prefix admin commands with admincheat instead of cheat.