1

[1.13.2] How to run a command if a player has a certain item in their inventory?

camocat9's Avatar camocat92/10/19 6:24 pm
1 emeralds 215 3
2/12/2019 4:40 am
Gilran's Avatar Gilran
In 1.13.2 I'm trying to create a command that will run a command that clears a players inventory and tells them a message if they have a specific item in their inventory. I have attempted a couple of different ways, but no forums are up-to-date with this information. Does anyone have any idea how to do this?

Thanks!
Posted by camocat9's Avatar
camocat9
Level 39 : Artisan Llama
41

Create an account or sign in to comment.

3

1
02/12/2019 4:40 amhistory
Level 24 : Expert Fisherman
Gilran
Gilran's Avatar
Try this to create an easy command: https://mcstacker.net/

1
02/10/2019 9:22 pm
Level 42 : Master Taco
spychicken123
spychicken123's Avatar
if you just do this command in a command block that is repeating, then change the item to whatever item you want it should work... k i tested it and it worked
execute as @a[nbt={Inventory:{id:"minecraft:redstone",Count:1b}]}] run clear @p
1
02/10/2019 7:17 pm
Level 32 : Artisan Explorer
TheCyanShyGuy
TheCyanShyGuy's Avatar
hmmmmm i have literally no knowledge on that in 1.13 i used to know the ins and outs of commands back in 1.12.2, but alas... times have changed im sorry i am no help.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome