How to give an enchanted golden shovel to players without an enchanted golden shovel? (spleef)
I am currently working on implementing a Spleef gamemode into a server I have, and I was wondering how to automatically give players shovels, while also not bombarding them with new shovels. I was hoping that there was a way to give a shovel to players without a shovel already in their inventory through command blocks.
1 Answer
I suggest using repeating command blocks (if you can keep a repeating command block running). If you're going to use repeating command blocks that continuously check if a player has the shovel item or not, you'll probably have to turn off CommandBlockOutput. To turn off the output text that command blocks make, just enter /gamerule commandBlockOutput false.
I don't exactly know how to format a command that does something like this, but essentially it needs to always check if any player has this shovel, and if they don't have this shovel, then give this player 1 of this specific shovel. I'm pretty sure you can also specify the requirements of what shovel to check and give down to the name (formatting + color), tags, and possibly enchantments (you would need a lot of command formatting, though).
4