Package net.kyori.adventure.text
Interface NBTComponent<C extends NBTComponent<C,B>,B extends NBTComponentBuilder<C,B>>
- 
- Type Parameters:
- C- component type
- B- builder type
 - All Superinterfaces:
- Buildable<C,B>,- BuildableComponent<C,B>,- Component,- ComponentBuilderApplicable,- ComponentLike,- net.kyori.examination.Examinable,- HoverEventSource<Component>,- StyleGetter,- StyleSetter<Component>
 - All Known Subinterfaces:
- BlockNBTComponent,- EntityNBTComponent,- StorageNBTComponent
 
 public interface NBTComponent<C extends NBTComponent<C,B>,B extends NBTComponentBuilder<C,B>> extends BuildableComponent<C,B> A component that can display NBT fetched from different locations, optionally trying to interpret the NBT as JSON using thenet.kyori.adventure.text.serializer.gson.GsonComponentSerializerto convert the JSON to aComponent. Sending interpreted NBT to the chat would be similar to using/tellraw.This component consists of: - nbtPath
- a path to specify which parts of the nbt you want displayed(examples).
- interpret
- a boolean telling adventure if the fetched NBT value should be parsed as JSON
 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
- Since Minecraft:
- 1.14
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface net.kyori.adventure.util.BuildableBuildable.Builder<R>
 
- 
 - 
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 Modifier and Type Method Description default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty>examinableProperties()booleaninterpret()Gets if we should be interpreting.Cinterpret(boolean interpret)Sets if we should be interpreting.@NotNull java.lang.StringnbtPath()Gets the NBT path.CnbtPath(@NotNull java.lang.String nbtPath)Sets the NBT path.@Nullable Componentseparator()Gets the separator.Cseparator(@Nullable ComponentLike separator)Sets the separator.- 
Methods inherited from interface net.kyori.adventure.text.BuildableComponenttoBuilder
 - 
Methods inherited from interface net.kyori.adventure.text.Componentappend, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, asHoverEvent, children, children, clickEvent, clickEvent, color, color, colorIfAbsent, compact, componentBuilderApply, contains, contains, decorate, decoration, decoration, decoration, decorationIfAbsent, decorations, decorations, detectCycle, font, font, hasDecoration, hasStyling, hoverEvent, hoverEvent, insertion, insertion, iterable, iterable, iterator, iterator, mergeStyle, mergeStyle, mergeStyle, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, spliterator, spliterator, style, style, style, style, style
 - 
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEvent
 - 
Methods inherited from interface net.kyori.adventure.text.format.StyleSetterdecorate, decorations
 
- 
 
- 
- 
- 
Method Detail- 
nbtPath@NotNull @NotNull java.lang.String nbtPath() Gets the NBT path.- Returns:
- the NBT path
- Since:
- 4.0.0
 
 - 
nbtPath@Contract(pure=true) @NotNull C nbtPath(@NotNull @NotNull java.lang.String nbtPath) Sets the NBT path.- Parameters:
- nbtPath- the NBT path
- Returns:
- an NBT component
- Since:
- 4.0.0
 
 - 
interpretboolean interpret() Gets if we should be interpreting.- Returns:
- if we should be interpreting
- Since:
- 4.0.0
 
 - 
interpret@Contract(pure=true) @NotNull C interpret(boolean interpret) Sets if we should be interpreting.- Parameters:
- interpret- if we should be interpreting.
- Returns:
- an NBT component
- Since:
- 4.0.0
 
 - 
separator@Nullable @Nullable Component separator() Gets the separator.- Returns:
- the separator
- Since:
- 4.8.0
 
 - 
separator@NotNull C separator(@Nullable @Nullable ComponentLike separator) Sets the separator.- Parameters:
- separator- the separator
- Returns:
- the separator
- Since:
- 4.8.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
 
 
- 
 
-