Package net.kyori.adventure.text
Interface StorageNBTComponent
- All Superinterfaces:
Buildable<StorageNBTComponent,StorageNBTComponent.Builder>,BuildableComponent<StorageNBTComponent,StorageNBTComponent.Builder>,Component,ComponentBuilderApplicable,ComponentLike,net.kyori.examination.Examinable,HoverEventSource<Component>,NBTComponent<StorageNBTComponent,StorageNBTComponent.Builder>,ScopedComponent<StorageNBTComponent>
public interface StorageNBTComponent extends NBTComponent<StorageNBTComponent,StorageNBTComponent.Builder>, 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:
NBTComponent- Since Minecraft:
- 1.15
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStorageNBTComponent.BuilderA command storage NBT component builder. -
Method Summary
Modifier and Type Method Description @NonNull net.kyori.adventure.key.Keystorage()Gets the NBT storage's ID.@NonNull StorageNBTComponentstorage(@NonNull net.kyori.adventure.key.Key storage)Sets the NBT storage.Methods inherited from interface net.kyori.adventure.text.BuildableComponent
toBuilderMethods inherited from interface net.kyori.adventure.text.Component
asComponent, asHoverEvent, children, clickEvent, color, componentBuilderApply, contains, decoration, decorations, decorations, detectCycle, hasDecoration, hasStyling, hoverEvent, insertion, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, style, styleMethods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examineMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface net.kyori.adventure.text.NBTComponent
interpret, interpret, nbtPath, nbtPathMethods inherited from interface net.kyori.adventure.text.ScopedComponent
append, append, append, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, style, style, style
-
Method Details
-
storage
@NonNull net.kyori.adventure.key.Key storage()Gets the NBT storage's ID.- Returns:
- the NBT storage
- Since:
- 4.0.0
-
storage
@Contract(pure=true) @NonNull StorageNBTComponent storage(@NonNull net.kyori.adventure.key.Key storage)Sets the NBT storage.- Parameters:
storage- the identifier of the NBT storage- Returns:
- a storage NBT component
- Since:
- 4.0.0
-