Interface Text
- All Known Implementing Classes:
Text.Literal, Text.Translated
Text rendered only when the viewer's locale is known: a fixed component or a key and arguments.
Used for names, titles, labels and lore stored before delivery.
The set of permitted subtypes may grow in a 7.x minor release. Code outside the framework
must not switch over it exhaustively without a
default branch.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordFixed text.static final recordA deferred message with an unmodifiable argument copy. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Textliteral(net.kyori.adventure.text.ComponentLike component) Returns a fixed component, identical for all locales.static Textof(MessageKey key, Arg... args) Returns a deferred message; argument names must be unique.static Textof(MessageKey key, List<? extends Arg> args) Returns a deferred message; argument names must be unique.static TextShorthand forliteral(Component.text(plain)).
-
Method Details
-
literal
Returns a fixed component, identical for all locales. -
plain
-
of
Returns a deferred message; argument names must be unique. The array is copied. -
of
Returns a deferred message; argument names must be unique. The list is copied.
-