Package net.kyori.adventure.text
Interface KeybindComponent
-
- All Superinterfaces:
Buildable<KeybindComponent,KeybindComponent.Builder>,BuildableComponent<KeybindComponent,KeybindComponent.Builder>,Component,ComponentBuilderApplicable,ComponentLike,net.kyori.examination.Examinable,HoverEventSource<Component>,ScopedComponent<KeybindComponent>,StyleGetter,StyleSetter<Component>
public interface KeybindComponent extends BuildableComponent<KeybindComponent,KeybindComponent.Builder>, ScopedComponent<KeybindComponent>
AComponentthat displays the client's current keybind for the supplied action.This component takes:
- keybind
- a keybind identifier for a action. (e.g key.inventory, key.jump etc..)
- Since:
- 4.0.0
- Since Minecraft:
- 1.12
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceKeybindComponent.BuilderA keybind component builder.static interfaceKeybindComponent.KeybindLikeSomething that can provide a keybind identifier.
-
Field Summary
-
Fields inherited from interface net.kyori.adventure.text.Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty>examinableProperties()@NotNull java.lang.Stringkeybind()Gets the keybind.@NotNull KeybindComponentkeybind(@NotNull java.lang.String keybind)Sets the keybind.default @NotNull KeybindComponentkeybind(@NotNull KeybindComponent.KeybindLike keybind)Sets the keybind.-
Methods inherited from interface net.kyori.adventure.text.BuildableComponent
toBuilder
-
Methods inherited from interface net.kyori.adventure.text.Component
appendNewline, 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.HoverEventSource
asHoverEvent
-
Methods 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
-
Methods inherited from interface net.kyori.adventure.text.format.StyleSetter
decorate, decorations
-
-
-
-
Method Detail
-
keybind
@NotNull @NotNull java.lang.String keybind()
Gets the keybind.- Returns:
- the keybind
- Since:
- 4.0.0
-
keybind
@Contract(pure=true) @NotNull @NotNull KeybindComponent keybind(@NotNull @NotNull java.lang.String keybind)
Sets the keybind.- Parameters:
keybind- the keybind- Returns:
- a copy of this component
- Since:
- 4.0.0
-
keybind
@Contract(pure=true) @NotNull default @NotNull KeybindComponent keybind(@NotNull @NotNull KeybindComponent.KeybindLike keybind)
Sets the keybind.- Parameters:
keybind- the keybind- Returns:
- a copy of this component
- Since:
- 4.9.0
-
examinableProperties
@NotNull default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
- Specified by:
examinablePropertiesin interfaceComponent- Specified by:
examinablePropertiesin interfacenet.kyori.examination.Examinable
-
-