How can I use tellraw when a person's score goes up or down?

How can I use tellraw when a person's score goes up or down? - Gathering Football Players

I have a scoreboard objective, EMERALDS, that automatically changes based on the number of emeralds in a player's inventory.

When a person gains/loses a point I want to display a /tellraw to the player saying "Gained/Lost An Emerald". How can I do this?



Best Answer

I believe you could use the /testfor command like so:

/testfor @p[score_Emeralds=2,r=1000]

And you could testfor each score then connect the /testfor command to a comparator which would activate the /tellraw command.




Pictures about "How can I use tellraw when a person's score goes up or down?"

How can I use tellraw when a person's score goes up or down? - Cheerful young woman making phone call on street
How can I use tellraw when a person's score goes up or down? - Anonymous soccer player warming up in training
How can I use tellraw when a person's score goes up or down? - From above of travelers on square in front of aged vintage panoramic exploring sightseeing and studying place in daylight



How do you use the Tellraw command?

How to Enter the Command
  • Open the Chat Window. The easiest way to run a command in Minecraft is within the chat window.
  • Type the Command. In this example, we will send a private message to the player called DigMinecraft with the following command: /tellraw DigMinecraft {"text":"Herobrine joined the game","color":"yellow"}




  • Minecraft Tellraw Command [1.19] Tutorial




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

    Images: Pixabay, Andrea Piacquadio, RF._.studio, Sebastiaan Stam