Struct minecraft_json::minecraft::text::Score[][src]

pub struct Score {
    pub name: String,
    pub objective: String,
    pub value: String,
}
Expand description

Displays a score from the scoreboard. Requires component resolution. This component is resolved into a text component containing the scoreboard value.

Fields

name: String

The name of the score holder whose score should be displayed. This can be a selector like @p or an explicit name. If the text is a selector, the selector must be guaranteed to never select more than one entity, possibly by adding limit=1. If the text is "*", it shows the reader’s own score (for example, /tellraw @a {"score":{"name":"*","objective":"obj"}} shows every online player their own score in the "obj" objective).

objective: String

The internal name of the objective to display the player’s score in.

value: String

Optional. If present, this value is displayed regardless of what the score would have been.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.