Class ComponentConverter

java.lang.Object
com.comphenix.protocol.wrappers.ComponentConverter

public final class ComponentConverter extends Object
Utility class for converting between the BungeeCord Chat API and ProtocolLib's wrapper

Note: The BungeeCord Chat API is not included in CraftBukkit.

  • Method Details

    • fromWrapper

      public static net.md_5.bungee.api.chat.BaseComponent[] fromWrapper(WrappedChatComponent wrapper)
      Converts a WrappedChatComponent into an array of BaseComponents
      Parameters:
      wrapper - ProtocolLib wrapper
      Returns:
      BaseComponent array
    • fromBaseComponent

      public static WrappedChatComponent fromBaseComponent(net.md_5.bungee.api.chat.BaseComponent... components)
      Converts an array of BaseComponents into a ProtocolLib wrapper
      Parameters:
      components - BaseComponent array
      Returns:
      ProtocolLib wrapper
    • getBaseComponentArrayClass

      public static Class<?> getBaseComponentArrayClass()
    • clone

      public static net.md_5.bungee.api.chat.BaseComponent[] clone(net.md_5.bungee.api.chat.BaseComponent... components)