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 SummaryConstructors Constructor Description AbstractComponentRenderer()
- 
Method SummaryModifier and Type Method Description @NonNull Componentrender(@NonNull Component component, @NonNull C context)Renders a component.protected abstract @NonNull ComponentrenderBlockNbt(@NonNull BlockNBTComponent component, @NonNull C context)Renders a block NBT component.protected abstract @NonNull ComponentrenderEntityNbt(@NonNull EntityNBTComponent component, @NonNull C context)Renders an entity NBT component.protected abstract @NonNull ComponentrenderKeybind(@NonNull KeybindComponent component, @NonNull C context)Renders a keybind component.protected abstract @NonNull ComponentrenderScore(@NonNull ScoreComponent component, @NonNull C context)Renders a score component.protected abstract @NonNull ComponentrenderSelector(@NonNull SelectorComponent component, @NonNull C context)Renders a selector component.protected abstract @NonNull ComponentrenderStorageNbt(@NonNull StorageNBTComponent component, @NonNull C context)Renders a storage NBT component.protected abstract @NonNull ComponentrenderText(@NonNull TextComponent component, @NonNull C context)Renders a text component.protected abstract @NonNull ComponentrenderTranslatable(@NonNull TranslatableComponent component, @NonNull C context)Renders a translatable component.
- 
Constructor Details- 
AbstractComponentRendererpublic AbstractComponentRenderer()
 
- 
- 
Method Details- 
renderDescription copied from interface:ComponentRendererRenders a component.- Specified by:
- renderin interface- ComponentRenderer<C>
- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderBlockNbtprotected abstract @NonNull Component renderBlockNbt(@NonNull BlockNBTComponent component, @NonNull C context)Renders a block NBT component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderEntityNbtprotected abstract @NonNull Component renderEntityNbt(@NonNull EntityNBTComponent component, @NonNull C context)Renders an entity NBT component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderStorageNbtprotected abstract @NonNull Component renderStorageNbt(@NonNull StorageNBTComponent component, @NonNull C context)Renders a storage NBT component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderKeybindprotected abstract @NonNull Component renderKeybind(@NonNull KeybindComponent component, @NonNull C context)Renders a keybind component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderScoreprotected abstract @NonNull Component renderScore(@NonNull ScoreComponent component, @NonNull C context)Renders a score component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderSelectorprotected abstract @NonNull Component renderSelector(@NonNull SelectorComponent component, @NonNull C context)Renders a selector component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderTextprotected abstract @NonNull Component renderText(@NonNull TextComponent component, @NonNull C context)Renders a text component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
- 
renderTranslatableprotected abstract @NonNull Component renderTranslatable(@NonNull TranslatableComponent component, @NonNull C context)Renders a translatable component.- Parameters:
- component- the component
- context- the context
- Returns:
- the rendered component
 
 
-