Interface ComponentRenderer<C>

Type Parameters:
C - the context type
All Known Implementing Classes:
AbstractComponentRenderer, TranslatableComponentRenderer

public interface ComponentRenderer<C>
A component renderer.
Since:
4.0.0
  • Method Details

    • render

      @NotNull @NotNull Component render(@NotNull @NotNull Component component, @NotNull C context)
      Renders a component.
      Parameters:
      component - the component
      context - the context
      Returns:
      the rendered component
      Since:
      4.0.0
    • mapContext

      default <T> ComponentRenderer<T> mapContext(Function<T,C> transformer)
      Return a ComponentRenderer that takes a different context type.
      Type Parameters:
      T - transformation function
      Parameters:
      transformer - context type transformer
      Returns:
      mapping renderer
      Since:
      4.0.0