- All Superinterfaces:
Buildable<NBTComponentBuilder<EntityNBTComponent,,?>> BuildableComponent<EntityNBTComponent,,NBTComponentBuilder<EntityNBTComponent, ?>> Component,ComponentBuilderApplicable,ComponentLike,HoverEventSource<Component>,NBTComponent<EntityNBTComponent>,ScopedComponent<EntityNBTComponent>,StyleGetter,StyleSetter<Component>
public sealed interface EntityNBTComponent
extends NBTComponent<EntityNBTComponent>, ScopedComponent<EntityNBTComponent>
Given a Minecraft selector, this component reads the NBT of the associated entity and displays that information.
This component consists of:
- selector
- a Minecraft selector.(e.g
@p,@r) - everything in
NBTComponent
- Since:
- 4.0.0
- See Also:
- Since Minecraft:
- 1.14
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn entity NBT component builder. -
Field Summary
Fields inherited from interface net.kyori.adventure.text.Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTYFields inherited from interface net.kyori.adventure.text.NBTComponent
INTERPRET_DEFAULT, PLAIN_DEFAULT -
Method Summary
Modifier and TypeMethodDescriptionselector()Gets the entity selector.Sets the entity selector.Create a builder from this component.Methods inherited from interface net.kyori.adventure.text.Component
asHoverEvent, children, clickEvent, color, compact, compact, componentBuilderApply, contains, contains, decoration, decorations, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceText, replaceText, shadowColor, spliterator, spliterator, styleMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface net.kyori.adventure.text.NBTComponent
interpret, interpret, nbtPath, nbtPath, plain, plain, separator, separatorMethods inherited from interface net.kyori.adventure.text.ScopedComponent
append, append, append, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, decorations, font, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, shadowColor, shadowColorIfAbsent, style, style, style, styleMethods inherited from interface net.kyori.adventure.text.format.StyleSetter
decorate, decorations
-
Method Details
-
selector
String selector()Gets the entity selector.- Returns:
- the entity selector
- Since:
- 4.0.0
-
selector
Sets the entity selector.- Parameters:
selector- the entity selector- Returns:
- an entity NBT component
- Since:
- 4.0.0
-
toBuilder
EntityNBTComponent.Builder toBuilder()Description copied from interface:BuildableComponentCreate a builder from this component.- Specified by:
toBuilderin interfaceBuildable<NBTComponentBuilder<EntityNBTComponent,?>> - Specified by:
toBuilderin interfaceBuildableComponent<EntityNBTComponent,NBTComponentBuilder<EntityNBTComponent, ?>> - Specified by:
toBuilderin interfaceComponent- Specified by:
toBuilderin interfaceNBTComponent<EntityNBTComponent>- Specified by:
toBuilderin interfaceScopedComponent<EntityNBTComponent>- Returns:
- the builder
-