Class AbstractComponentRenderer<C>
java.lang.Object
net.kyori.adventure.text.renderer.AbstractComponentRenderer<C>
- Type Parameters:
C
- the context type
- All Implemented Interfaces:
ComponentRenderer<C>
- Direct Known Subclasses:
TranslatableComponentRenderer
An abstract implementation of a component renderer.
- Since:
- 4.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Component
Renders a component.protected abstract @NotNull Component
renderBlockNbt
(@NotNull BlockNBTComponent component, C context) Renders a block NBT component.protected abstract @NotNull Component
renderEntityNbt
(@NotNull EntityNBTComponent component, C context) Renders an entity NBT component.protected abstract @NotNull Component
renderKeybind
(@NotNull KeybindComponent component, C context) Renders a keybind component.protected abstract @NotNull Component
renderScore
(@NotNull ScoreComponent component, C context) Renders a score component.protected abstract @NotNull Component
renderSelector
(@NotNull SelectorComponent component, C context) Renders a selector component.protected abstract @NotNull Component
renderStorageNbt
(@NotNull StorageNBTComponent component, C context) Renders a storage NBT component.protected abstract @NotNull Component
renderText
(@NotNull TextComponent component, C context) Renders a text component.protected abstract @NotNull Component
renderTranslatable
(@NotNull TranslatableComponent component, C context) Renders a translatable component.protected @NotNull Component
renderVirtual
(@NotNull VirtualComponent component, C context) Renders a virtual component.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.text.renderer.ComponentRenderer
mapContext
-
Constructor Details
-
AbstractComponentRenderer
public AbstractComponentRenderer()
-
-
Method Details
-
render
@NotNull public @NotNull Component render(@NotNull @NotNull Component component, @NotNull C context) Description copied from interface:ComponentRenderer
Renders a component.- Specified by:
render
in interfaceComponentRenderer<C>
- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderBlockNbt
@NotNull protected abstract @NotNull Component renderBlockNbt(@NotNull @NotNull BlockNBTComponent component, @NotNull C context) Renders a block NBT component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderEntityNbt
@NotNull protected abstract @NotNull Component renderEntityNbt(@NotNull @NotNull EntityNBTComponent component, @NotNull C context) Renders an entity NBT component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderStorageNbt
@NotNull protected abstract @NotNull Component renderStorageNbt(@NotNull @NotNull StorageNBTComponent component, @NotNull C context) Renders a storage NBT component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderKeybind
@NotNull protected abstract @NotNull Component renderKeybind(@NotNull @NotNull KeybindComponent component, @NotNull C context) Renders a keybind component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderScore
@NotNull protected abstract @NotNull Component renderScore(@NotNull @NotNull ScoreComponent component, @NotNull C context) Renders a score component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderSelector
@NotNull protected abstract @NotNull Component renderSelector(@NotNull @NotNull SelectorComponent component, @NotNull C context) Renders a selector component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderText
@NotNull protected abstract @NotNull Component renderText(@NotNull @NotNull TextComponent component, @NotNull C context) Renders a text component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-
renderVirtual
@NotNull protected @NotNull Component renderVirtual(@NotNull @NotNull VirtualComponent component, @NotNull C context) Renders a virtual component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
- Since:
- 4.18.0
-
renderTranslatable
@NotNull protected abstract @NotNull Component renderTranslatable(@NotNull @NotNull TranslatableComponent component, @NotNull C context) Renders a translatable component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
-