Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String.toComponent and Component.toString() methods? #12

Open
Dawsson opened this issue Sep 2, 2023 · 1 comment
Open

String.toComponent and Component.toString() methods? #12

Dawsson opened this issue Sep 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Dawsson
Copy link
Member

Dawsson commented Sep 2, 2023

This is what I use for minimessage + string to components:

    fun String.toComponent(): Component = MiniMessage.miniMessage().deserialize(this)

    fun Component.toString(): String = MiniMessage.miniMessage().serialize(this)
@Dawsson Dawsson added the enhancement New feature or request label Sep 2, 2023
@SimplyMerlin
Copy link

overriding toString doesnt seem like a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants