Interface SpigotTextAdapter


public interface SpigotTextAdapter
An adapter for converting text Components to Spigot (BungeeCord) objects.

This class is an extension of TextAdapter, since the plain Bukkit API does not include the BungeeCord Chat API.

  • Method Summary

    Static Methods 
    Modifier and Type Method Description
    static @NonNull net.md_5.bungee.api.chat.BaseComponent[] toBungeeCord​(@NonNull net.kyori.text.Component component)
    Converts component to the BaseComponent format used by Spigot (BungeeCord).
  • Method Details

    • toBungeeCord

      static @NonNull net.md_5.bungee.api.chat.BaseComponent[] toBungeeCord​(@NonNull net.kyori.text.Component component)
      Converts component to the BaseComponent format used by Spigot (BungeeCord).

      The adapter makes no guarantees about the underlying structure/type of the components. i.e. is it not guaranteed that a TextComponent will map to a TextComponent.

      The sendComponent methods should be used instead of this method when possible.

      Parameters:
      component - the component
      Returns:
      the Text representation of the component