Package com.comphenix.protocol.wrappers
Class ComponentConverter
java.lang.Object
com.comphenix.protocol.wrappers.ComponentConverter
Utility class for converting between the BungeeCord Chat API and ProtocolLib's wrapper
Note: The BungeeCord Chat API is not included in CraftBukkit.
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.md_5.bungee.api.chat.BaseComponent[]clone(net.md_5.bungee.api.chat.BaseComponent... components) static WrappedChatComponentfromBaseComponent(net.md_5.bungee.api.chat.BaseComponent... components) Converts an array ofBaseComponents into a ProtocolLib wrapperstatic net.md_5.bungee.api.chat.BaseComponent[]fromWrapper(WrappedChatComponent wrapper) Converts aWrappedChatComponentinto an array ofBaseComponentsstatic Class<?>
-
Method Details
-
fromWrapper
Converts aWrappedChatComponentinto an array ofBaseComponents- Parameters:
wrapper- ProtocolLib wrapper- Returns:
- BaseComponent array
-
fromBaseComponent
public static WrappedChatComponent fromBaseComponent(net.md_5.bungee.api.chat.BaseComponent... components) Converts an array ofBaseComponents into a ProtocolLib wrapper- Parameters:
components- BaseComponent array- Returns:
- ProtocolLib wrapper
-
getBaseComponentArrayClass
-
clone
public static net.md_5.bungee.api.chat.BaseComponent[] clone(net.md_5.bungee.api.chat.BaseComponent... components)
-