TransWikia.com

Finding the criteria for a scoreboard objective

Arqade Asked on July 14, 2021

I’m trying to understand a Minecraft game that someone else has written. They’ve used the scoreboard feature to implement a few variables.

Say the author used /scoreboard objectives add objectiveA xp.

When I type /scoreboard objectives list, I get There are 1 objectives: [objectiveA].

But how can I query the system to find out that "objectiveA has criteria xp"?

This is in Minecraft 1.15.2, Java edition.

2 Answers

This used to be possible in Minecraft 1.12, where you would see the objective's type. You would get the following when typing /scoreboard objectives list.

Showing 2 objective(s) on scoreboard:
- Objective1: displays as 'First Objective' and is type 'xp'
- Objective2: displays as 'Second Objective' and is type 'dummy'

In 1.13+, you get the following result instead:

There are 2 objective(s): [First Objective], [Second Objective]

When I was using scoreboards, I found myself using /scoreboard objectives list very often. And you can hover over the objective's display names to reveal their ID. (Objective1, Objective2)

I thought that it would display the objective type there as well, but it doesn't.

Unless there is some other, more clever way that I don't know of, what you have requested may not be possible. Still, consider waiting for the next answer in case that solution is thought of by our community's more clever members.

At least scoreboards of type trigger can be listed by using the autocomplete of /scoreboard players enable @s .

By using external tools like NBTExplorer, you can open the data/scoreboard.dat file of the world. It has a data/Objectives tag that is a list of scoreboards with the type in their CriteriaName tag. You can also see RenderType there.

Answered by ExpertCoder14 on July 14, 2021

To view objectiveA's variable you could use

/tellraw @s {"score":{"name":"@s","objective":"objectiveA"}}

which would print the variable in chat to whatever player executes it change the objectiveA part to any other objective and it will still work

p.s i got the /tellraw command from

https://minecraft.tools/en/json_text.php?json=

Answered by redbandithero14 on July 14, 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