Arqade Asked by CyberLuka on April 13, 2021
I’m new in these kinds of scoreboard and trigger commands. I would like to know how to display any kind of text/number on my scoreboard. Can anyone explain and give me examples of those commands?
The sidebar is a display of "players" and their scores in one scoreboard. You can create a scoreboard like this:
/scoreboard objectives add scoreboard_id dummy "Scoreboard display text"
This creates a scoreboard with the ID "scoreboard_id
" that is shown in the sidebar and in the feedback of some commands as "Scoreboard display text" and is of type "dummy
", which means that nothing changes it except for commands.
To show it in the sidebar, do this:
/scoreboard objectives setdisplay sidebar scoreboard_id
But it doesn't actually show up until someone has a score in that scoreboard.
Now to the thing you actually asked about: To show arbitrary text in the sidebar, you need to set a score of a "dummy player" to a value. Example:
/scoreboard players set player_name scoreboard_id 42
This will show up like this in the sidebar:
But be careful! There is a real Minecraft account named "player_name" (archive), so if that person is on your server or plays a map that you release or anything like that, you will actually set their score to that value. There are only two ways I know around that:
$name
". But it will be displayed like that on the sidebar.$r
" before the dummy player name. The problem is that this only works in functions. So you need to create a datapack with a function that does nothing except setting a scoreboard score, have it enabled and run the function instead of directly running the command.Thanks to Lilith in the Minecraft commands Discord chat for the tip about the formatting code!
Answered by Fabian Röling on April 13, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP