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 Details

  • Method Details

    • render

      public @NonNull Component render​(@NonNull Component component, @NonNull C context)
      Description copied from interface: ComponentRenderer
      Renders a component.
      Specified by:
      render in interface ComponentRenderer<C>
      Parameters:
      component - the component
      context - the context
      Returns:
      the rendered component
    • renderBlockNbt

      protected 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
    • renderEntityNbt

      protected 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
    • renderStorageNbt

      protected 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
    • renderKeybind

      protected 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
    • renderScore

      protected 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
    • renderSelector

      protected 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
    • renderText

      protected 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
    • renderTranslatable

      protected 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