Created
October 21, 2020 16:15
-
-
Save webcrawls/c03cbd5d02436e5e4cedc2ab1bf93306 to your computer and use it in GitHub Desktop.
a helper method for the adventure text library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Serializes an adventure Component to a String, for use in methods which don't support components. | |
* | |
* @param component Component to serialize | |
* @return Formatted string | |
*/ | |
public static String componentToString(Component component) { | |
return TextComponent.toLegacyText(BungeeComponentSerializer.get().serialize(component)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment