Interface HtmlComponentSerializer

All Superinterfaces:
net.kyori.adventure.text.serializer.ComponentEncoder<net.kyori.adventure.text.Component,String>

@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class) public interface HtmlComponentSerializer extends net.kyori.adventure.text.serializer.ComponentEncoder<net.kyori.adventure.text.Component,String>
Safely encodes Components as HTML text.

Mostly useful for marker tooltips.

Since:
1.2.0
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    withFlattener(net.kyori.adventure.text.flattener.ComponentFlattener flattener)
    Create a new HtmlComponentSerializer using the provided ComponentFlattener.

    Methods inherited from interface net.kyori.adventure.text.serializer.ComponentEncoder

    serialize, serializeOr, serializeOrNull
  • Method Details

    • withFlattener

      static HtmlComponentSerializer withFlattener(net.kyori.adventure.text.flattener.ComponentFlattener flattener)
      Create a new HtmlComponentSerializer using the provided ComponentFlattener.
      Parameters:
      flattener - component flattener
      Returns:
      serializer