本文へスキップ
MC COMMANDS logoMC COMMANDS
コマンドビルダー

Minecraft /clear Generator.

Clears items from player inventories. 以下の設定を調整して、正しいコマンド構文を即座に自動生成します。

リアルタイム出力

生成されたマイクラ構文

この出力をコピーして、マインクラフトのチャット欄(Tキー)またはコマンドブロックに貼り付けてください。

/give @s diamond 64

このコマンドの機能解説

自分自身 (`@s`) のインベントリからアイテムを消去します。
Documentation & Guide

About the /clear Generator

The /clear generator constructs commands to remove specific items, stacks, or entire inventories from players.

How to Use This Generator

  1. Select the target player selector.
  2. Optionally specify the item ID to delete (e.g. minecraft:dirt).
  3. Optionally set the maximum count to remove (leave empty to remove all).
  4. Copy and run in chat or command block.

Parameters & Options Explained

Target

The player whose inventory will be cleaned.

Item ID

Specific item to target; leaving blank clears the entire inventory.

Max Count

Number of items to delete. Setting count to 0 queries item presence without deleting.

Practical In-Game Example

Tested & Validated
/clear @p minecraft:rotten_flesh

Removes all rotten flesh from the nearest player while keeping other items intact.

Java vs Bedrock Compatibility

Java Edition:Syntax: /clear <targets> [<item>] [<maxCount>]
Bedrock Edition:Syntax: /clear <player> [itemName] [data] [maxCount]

Important Limitations & Rules

  • Running /clear with no arguments empties the entire inventory including armor and offhand.
  • Cannot target offline players.
Advertisement