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>
public interface KeybindComponent extends BuildableComponent<KeybindComponent,KeybindComponent.Builder>, ScopedComponent<KeybindComponent>
A
Component that 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. -
Method Summary
Modifier and Type Method Description @NonNull Stringkeybind()Gets the keybind.@NonNull KeybindComponentkeybind(@NonNull String keybind)Sets the keybind.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.ScopedComponent
append, append, append, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, style, style, style
-
Method Details
-
keybind
@NonNull String keybind()Gets the keybind.- Returns:
- the keybind
- Since:
- 4.0.0
-
keybind
Sets the keybind.- Parameters:
keybind- the keybind- Returns:
- a copy of this component
- Since:
- 4.0.0
-