Keycard authentication with commands

Keycard authentication with commands - Various types of spices for healthy food food preparation

I wanted to make a keycard authentication system using the /testfor command. I want to testfor a player with a JSON book. Is this possible?

I successfully managed to test for a player (myself if it makes any difference) with stone. Instead of minecraft:stone I then tried putting minecraft:written_book {etc.}. (After the written book I pasted the part of the command here: /give @p written_book. Why does this not work and what have I done wrong?



Best Answer

Item, entity and effect names have recommended adding minecraft: to them since they were implemented, and now require it. If you press Tab in the command prompt, it will automatically be added.




Pictures about "Keycard authentication with commands"

Keycard authentication with commands - From above of sage candle in bowl placed on white marble shelf near plaster Buddha bust and creative shape vase for home decoration
Keycard authentication with commands - Narrow street with traditional Japanese izakaya bars decorated with hieroglyphs and traditional red lanterns in evening
Keycard authentication with commands - Unrecognizable woman holding paw of dog





Minecraft 1.16.5: How to make a keycard system




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Karolina Grabowska, Karolina Grabowska, Ryutaro Tsukata, Ivan Babydov