Component.text(String)
to create a component which has that text in it verbatim. There are also several overloads of this method which allow you to specify a style and color if you want to do this. Then with Component#append(Component)
you can combine multiple of these pieces of text together if you wish to. For just the basic message you mentioned, the first method should suffice however.Component.text(String)
to create a component which has that text in it verbatim. There are also several overloads of this method which allow you to specify a style and color if you want to do this. Then with Component#append(Component)
you can combine multiple of these pieces of text together if you wish to. For just the basic message you mentioned, the first method should suffice however.Object#equals(Object)
. If you only want the text to match, then you want to first convert it to plain text via a PlainTextComponentSerializer
and then compare the resulting `String`s via Object#equals(Object)
.