Minecraft – How to find a player with a score in 1.13.1

minecraft-commandsminecraft-java-edition

Say there was a scoreboard objective called money, and say they had 1 money. How do I see if a player has at least 1 money? as in /testfor @a[score_money_min=1], except using /execute or something in 1.13.1? I am currently trying to make a Vanilla Server for fun. I am currently making a custom command.

Best Answer

Edit: I understand what you want now. Thank you for clarifying in your question. It is rather tricky since /testfor is removed in 1.13. The command for checking the minimum count for objective "money" in 1.13.1 would be:

/execute if entity @a[scores={money=1..}]

The two dots after the 1 are correct, they mean "greater than". See the following wiki page for more information of selecting targets by score:

https://minecraft.gamepedia.com/Commands#Target_selector_arguments

Hope that helps.