Scoreboards
This tutorial will teach you about scoreboards. Scoreboards are probably the second most complicated command after the new execute command. First we will talk about the tag command. The tag command used to be part of the scoreboards command so I am not getting off track. The tag command allows you to use a selector and list all tags, remove a tag or add a tag. tag @e list, tag @e[type=pig] add oinky and tag @e[type=pig] remove oinky respectively. Need help with selectors? Visit this page below.
That is the tag command done. You will notice that the tag command and the scoreboard command are used for selectors. That is fine. On to the scoreboard command. The scoreboard command has two options for its second argument: "objectives" and "players". Notice they are both plural, make sure to use the 's' when spelling. Objectives is more based on the scoreboards themselves whereas players is based on the players that have objectives.
​
We will start first with objectives. The next argument has 5 options: "add", "list", "modify", "remove" and "setdisplay". List is the easiest one as it requires nothing else. /scoreboard objectives list will list all objectives. Setdisplay will set the display in a certain area to be a certain objectives. The 3 areas are: on the tab menu, on the side of your screen and under your nametag. /scoreboard objectives setdisplay list objective_here will do the tab menu. /scoreboard objectives setdisplay sidebar objective_here will do the side of your screen menu. Finally /scoreboard objectives setdisplay belowName objective_here will do below your name tag. The next one I'll talk about is add. /scoreboard objectives add objective_here objective_type Objective Display. The last three arguments might seem confusing so I will go over them now. objective_here is what you will call your objective in your commands. objective_type is the type of objective. I will talk about two types, the rest can be found by typing on google "scoreboard types 1.13". "dummy" and "trigger" are the two ones that don't get set by anything besides commands. Trigger however has a unique feature that it can be changed with the /trigger.
​
Now onto players. You will notice that the scoreboard display isn't working yet if you have tried that. This is because nobody in your world has a scoreboard. Not a value of 0 they don't have any scoreboard. There is a subcommand for it. Enable. You don't have to use this command there are alternatives which I'll get to later. /scoreboard players enable @a objective_name. This will allow you to see scoreboards and the value will be 0 and any selectors will now output. The opposite of that is reset. /scoreboard players reset @a objective_name It will set the value to null. When enabled again it will be 0 no matter what it was prior to the reset. This has no alternative and also I can't think of a use for it. The next subcommand for players is add. For example /scoreboard players add @p objective_name 1. This will add one to your current score. Remember when I said alternatives? If you add 0 you can get the same effect as enable. It will also not affect other entities with a higher score. Next part is the opposite of add, remove. It works in the same way /scoreboard players remove @p objective_name 1. And removing 0 does the same thing. Next up is set. Set works similar to add and remove. /scoreboard players set @p test 1. As you can imagine this will always make the value what you wanted. This is also an alternative but it needs a more accurate selector so no other entities are affected. The selector would be @e[scores={objective_name=!0..}]. This means if it has a value of at least 0 which is always the case unless it doesn't have a value. Since I used an "!" that means its reversed so if it is not at least 0. Negative scoreboards are possible however so just change 0 to the lowest it will possibly get. The next two are very similar list and get. List is used like this /scoreboard players list @p and will act list all their scores for all their objectives. Get is used like this /scoreboard players get @p objective_name and will list their score for the selected objective. The final one is operation. This allows you to modify the scoreboard in somebit. /scoreboard players operation @p objective_one *= @p objective_two. This is a tough one to understand so bear with me. The first objective is the one you modify. The second one is what you modify it with. You cannot chose normal numbers. To do so you will have to have some commands that will set a certain objective let's say objective "two" to 2 for all players or one person on the world in particular. You don't need to enable it as it is already being set. Then you can do /scoreboard players operation @p objective_name *= Player_Name two. Now the last part of operation is understanding the "*=". This means that it will times itself to the next objectives and that will be its new value. Kind of confusing. There are other operations you can use "%=", "*=", "+=", "-=", "/=", "<", "=". ">" or "><". The last four I don't fully understand so if you spot a mistake please be sure to tell me. We covered #2 and 1,3,4 and 5 look similar just different operations. The percentage sign means modulo. This will return the remainder of the division. Confusing but sometimes useful. The last 4 are conditionals. They are less than, equal to, greater than and (not equal to/greater than or less than). If the conditional is true it will set objective one to objective two. Otherwise leave it alone. This does mean the "=" is useless.
​
That is scoreboards completely covered. This is a very useful command along with the tag command. I will be showing examples of using this in execute. The link can be found below.