Interface StorageNBTComponent
- All Superinterfaces:
Component, ComponentBuilderApplicable, ComponentLike, HoverEventSource<Component>, NBTComponent<StorageNBTComponent>, ScopedComponent<StorageNBTComponent>, StyleGetter, StyleSetter<Component>
public sealed interface StorageNBTComponent
extends NBTComponent<StorageNBTComponent>, ScopedComponent<StorageNBTComponent>
Given a
Key, this component reads the NBT of the associated command storage and displays that information.
This component consists of:
- storage
- a key that represents the resource location of a command storage (eg. my_plugin:actions.punches_entity)
- everything in
NBTComponent
- Since:
- 4.0.0
- See Also:
- Since Minecraft:
- 1.15
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA command storage NBT component builder. -
Field Summary
Fields inherited from interface Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTYFields inherited from interface NBTComponent
INTERPRET_DEFAULT, PLAIN_DEFAULT -
Method Summary
Modifier and TypeMethodDescriptionstorage()Gets the NBT storage's ID.Sets the NBT storage.Returns a builder for this component.Methods inherited from interface 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 HoverEventSource
asHoverEventMethods inherited from interface NBTComponent
interpret, interpret, nbtPath, nbtPath, plain, plain, separator, separatorMethods inherited from interface 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 StyleSetter
decorate, decorations
-
Method Details
-
storage
-
storage
Sets the NBT storage.- Parameters:
storage- the identifier of the NBT storage- Returns:
- a storage NBT component
- Since:
- 4.0.0
-
toBuilder
StorageNBTComponent.Builder toBuilder()Description copied from interface:ComponentReturns a builder for this component.- Specified by:
toBuilderin interfaceComponent- Specified by:
toBuilderin interfaceNBTComponent<StorageNBTComponent>- Specified by:
toBuilderin interfaceScopedComponent<StorageNBTComponent>- Returns:
- the builder
-