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
public abstract class AbstractComponentRenderer<C> extends Object implements ComponentRenderer<C>
An abstract implementation of a component renderer.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentRenderer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull Component
render(@NotNull Component component, C context)
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.-
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
-
-
-
-
Method Detail
-
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
-
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
-
-