4

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 2

3

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.

1
-2

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=
2
  • 1
    Incorrect. This command shows how to query a player's score, not the objective criteria, or what the objective is affected by. Please read the question more carefully before posting an answer. Jul 7, 2020 at 2:48
  • I appreciate the thought and effort, though, @redbandithero14. Welcome to the stack!
    – Ashley
    Jul 7, 2020 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .