TransWikia.com

Having problems trying to add multiple objectives to sidebar using command blocks in minecraft

Arqade Asked by Rehunter on March 31, 2021

I have had the objective KillCount on the sidebar for some time now, but I recently discovered the possibility of several objectives. Therefore I have been trying to add the deathCount, killCount and Distance by Elytra (unsure of the last ones objective name). I have never really used the scoreboard command and tried the following;

/scoreboard players operation flightDistance Scores = Rehunter stat.flyOneCm 

(Again, unsure how to address this one right!)

/scoreboard players operation NumberOfDeaths Scores = Rehunter deathCount
/scoreboard players operation NumberOfKills Scores = Rehunter totalKillCount

I added the objectives by command but no progress is counted and I don’t know how to proceed. All help is appreciated, have been trying for a while to look it up but coudn’t find a specific answer.

One Answer

There can only ever be one objective set to display on the sidebar. What you can do however, and what you seem to be trying to do, is have one score displayed, then set this score for different "fake players" to your scores in the different objectives. Note that this will only work for one player.

It'll look something like this, where Scores is the one set to display in the sidebar:

Table illustrating objectives

Note that I've chosen different names for the objective name (e.g: Deaths), the objective type (e.g: deathCount), and the fake player's name (e.g: Number_Of_Deaths).

You'll first need to add all of the objectives that you'll be using:

/scoreboard objectives add Deaths deathCount
/scoreboard objectives add Kills totalKillCount
/scoreboard objectives add FlightDistance stat.flyOneCm
/scoreboard objectives add Scores dummy

On a clock, you'll then want to run these commands which set the fake player's score to your score in the corresponding objective:

/scoreboard players operation Number_Of_Deaths Scores = Rehunter Deaths
/scoreboard players operation Number_Of_Kills Scores = Rehunter Kills
/scoreboard players operation Distance_Flown Scores = Rehunter FlightDistance

This should then make the sidebar look something like:

Final sidebar display

Answered by SirBenet on March 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP