Package net.kyori.adventure.text
Interface ScoreComponent
- 
- All Superinterfaces:
- Buildable<ScoreComponent,ScoreComponent.Builder>,- BuildableComponent<ScoreComponent,ScoreComponent.Builder>,- Component,- ComponentBuilderApplicable,- ComponentLike,- net.kyori.examination.Examinable,- HoverEventSource<Component>,- ScopedComponent<ScoreComponent>,- StyleGetter,- StyleSetter<Component>
 
 public interface ScoreComponent extends BuildableComponent<ScoreComponent,ScoreComponent.Builder>, ScopedComponent<ScoreComponent> A component that can display a player's score from a scoreboard objective, with an optional fallback value if the search for the score fails.This component consists of: - name
- a player username or a Minecraft selector that leads to a single player
- objective
- a scoreboard objective
- value(optional)
- a value to use that will override any queried scoreboard value
   This field is no longer present in the game from 1.16, which means it will be ignored 
 This component is rendered serverside and can therefore receive platform-defined context. See the documentation for your respective platform for more info - Since:
- 4.0.0
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceScoreComponent.BuilderA score component builder.
 - 
Field Summary- 
Fields inherited from interface net.kyori.adventure.text.ComponentEQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty>examinableProperties()@NotNull java.lang.Stringname()Gets the score name.@NotNull ScoreComponentname(@NotNull java.lang.String name)Sets the score name.@NotNull java.lang.Stringobjective()Gets the objective name.@NotNull ScoreComponentobjective(@NotNull java.lang.String objective)Sets the score objective.@Nullable java.lang.Stringvalue()Deprecated.since 4.7.0, not for removal, with no replacement.@NotNull ScoreComponentvalue(@Nullable java.lang.String value)Deprecated.since 4.7.0, not for removal, with no replacement.- 
Methods inherited from interface net.kyori.adventure.text.BuildableComponenttoBuilder
 - 
Methods inherited from interface net.kyori.adventure.text.ComponentappendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, asHoverEvent, children, clickEvent, color, compact, componentBuilderApply, contains, contains, decoration, decorationIfAbsent, decorations, decorations, detectCycle, font, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, spliterator, spliterator, style, style
 - 
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEvent
 - 
Methods inherited from interface net.kyori.adventure.text.ScopedComponentappend, append, append, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, style, style, style
 - 
Methods inherited from interface net.kyori.adventure.text.format.StyleSetterdecorate, decorations
 
- 
 
- 
- 
- 
Method Detail- 
name@NotNull @NotNull java.lang.String name() Gets the score name.- Returns:
- the score name
- Since:
- 4.0.0
 
 - 
name@Contract(pure=true) @NotNull @NotNull ScoreComponent name(@NotNull @NotNull java.lang.String name) Sets the score name.- Parameters:
- name- the score name
- Returns:
- a score component
- Since:
- 4.0.0
 
 - 
objective@NotNull @NotNull java.lang.String objective() Gets the objective name.- Returns:
- the objective name
- Since:
- 4.0.0
 
 - 
objective@Contract(pure=true) @NotNull @NotNull ScoreComponent objective(@NotNull @NotNull java.lang.String objective) Sets the score objective.- Parameters:
- objective- the score objective
- Returns:
- a score component
- Since:
- 4.0.0
 
 - 
value@Deprecated @Nullable @Nullable java.lang.String value() Deprecated.since 4.7.0, not for removal, with no replacement. This field is no longer supported in 1.16.5.Gets the value.- Returns:
- the value
- Since:
- 4.0.0
 
 - 
value@Deprecated @Contract(pure=true) @NotNull @NotNull ScoreComponent value(@Nullable @Nullable java.lang.String value) Deprecated.since 4.7.0, not for removal, with no replacement. This field is no longer supported in 1.16.5.Sets the value.- Parameters:
- value- the value
- Returns:
- a score component
- Since:
- 4.0.0
 
 - 
examinableProperties@NotNull default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties() - Specified by:
- examinablePropertiesin interface- Component
- Specified by:
- examinablePropertiesin interface- net.kyori.examination.Examinable
 
 
- 
 
-