✔️ How To Check Items In Minecraft Player Inventory! ✔️

Video Summary
In this video I show how to check what items a player has in their Minecraft inventory using /execute with NBT inventory checks. I demonstrate testing for a normal item (like a diamond), testing for a specifically renamed item using display Name tags, and testing for multiple items at once by listing additional IDs. I also explain how to wire the result with a comparator so a positive test can trigger particles, effects, sounds, or other command block actions.

Formatted Transcript

Hey everybody, it’s Under My Cap, and welcome back to another video. Today I’m going to show you how to test for items in a Minecraft player’s inventory using commands.

This is a command I really enjoy using because it’s extremely flexible: you can test for normal items, test for renamed items, and even test for multiple items at the same time.

You also don’t need multiple command blocks like I have in my setup. One command block can run the test, and then—when the test is successful—a comparator can output a redstone signal to trigger another command block. From there you can run effects, particles, sounds, and more.

If you enjoy the tutorial, consider leaving a like, subscribing, and commenting suggestions for future videos. Now, let’s get started.

Testing for a Normal Item (Example: Diamond)

This first setup tests whether the nearest player has a diamond anywhere in their inventory.

When I don’t have a diamond, nothing happens (no particles). As soon as I pick up a diamond, the test succeeds and the particle command runs. If I drop the diamond, the comparator turns off. If I pick it back up, it turns back on.

How the Command Works

The command uses /execute and targets the nearest player with an NBT check on their inventory. The important part is checking the player’s Inventory data for an item ID.

A key tip: you can type item IDs using quotation marks (for example, "minecraft:diamond"). After that, make sure you close every bracket correctly—if your brackets don’t match, the command won’t work.

What You Can Trigger

I used particles because it’s simple, but you can replace the output with anything. For example, you could run:

/say You just picked up a diamond.

This lets you create custom feedback, sounds, effects, or any other behavior based on what the player is carrying.

Testing for a Renamed Item (Example: Renamed Gold Ingot)

The second example is a bit trickier because it checks for an item with a specific custom name.

If I pick up a gold ingot, nothing happens. That’s because the command isn’t just looking for the item—it’s looking for the item’s custom display name. Once I rename the gold ingot (for example, to “test”), the particles start working because the item now matches the name the command is checking for.

How the Named-Item Check Works

The command still uses /execute if entity and checks the player’s inventory NBT. First it confirms the item ID (such as "minecraft:gold_ingot"). Then it adds an extra requirement by checking the item’s tag data, specifically:

  • tag
  • display
  • Name

This is the part that makes it “named.” You must keep the JSON text format intact (the {"text":"..."} structure). Also, make sure your commas are correct—missing a comma will break the command.

When building it, retrace and close every bracket properly. If you miss one, the command will usually show as invalid (often turning red). When it’s correct, it should appear properly colored and valid.

Testing for Multiple Items (Two or More)

The last example tests for multiple items at once. This version is similar to the first command, except you list more than one item inside the inventory check.

To add more items, you separate each item test with a comma and include another item entry. For example, you can test for two items—or even three—by adding another comma and another item ID section.

Once the player has all required items, the test becomes positive and the output (like particles) will run. If the player removes any of the required items, the signal turns off.

Wrapping Up

That’s the command in a nutshell. It’s simple once you get used to the bracket structure, and it’s really powerful for maps, minigames, and custom mechanics.

If you enjoyed the tutorial, please leave a like and subscribe (with the bell on) so you don’t miss future videos. Also, comment suggestions for what you want me to cover next—I love reading them, and I’m always open to learning new things.

Thanks so much for watching, and I’ll see you in the next video.

Video Thumbnail

Recommended Items Based On Post

Bestseller #1
Bestseller #2
  • Battery Powered Minecraft Video Game Themed Desktop Air Hockey Electronic Game Nether Realm Edition
  • Official Minecraft Merchandise Manufactured under License from Microsoft & Mojang Studios by Merchant Ambassador
  • Features Genuine Nether Graphics and with 14 Swapable Pusher Covers with Different Characters
Bestseller #3
  • Features a 2 sword pens, a lead pencil and an eraser
  • Helps to paint and decorate your own pencil box
  • Made from high quality material

Advertisment

Leave a Reply

Scroll to Top