Interface ComponentCaptionFormatter<C>
- Type Parameters:
C- command sender type
- All Superinterfaces:
CaptionFormatter<C,Component>
@API(status=STABLE,
since="2.0.0")
public interface ComponentCaptionFormatter<C>
extends CaptionFormatter<C,Component>
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.incendo.cloud.caption.CaptionFormatter
CaptionFormatter.PatternReplacingCaptionFormatter<C> -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <C> @NonNull ComponentCaptionFormatter<C> Create a MiniMessage formatter with thedefault MiniMessage instanceand no extraTagResolvers.static <C> @NonNull ComponentCaptionFormatter<C> miniMessage(@NonNull MiniMessage miniMessage) Create a MiniMessage formatter with the provided MiniMessage instance and no extraTagResolvers.static <C> @NonNull ComponentCaptionFormatter<C> miniMessage(@NonNull MiniMessage miniMessage, @NonNull TagResolver @NonNull ... resolvers) Create a MiniMessage formatter with the provided MiniMessage instance and no extraTagResolvers.static <C> @NonNull ComponentCaptionFormatter<C> patternReplacing(@NonNull Pattern pattern) Returns a caption formatter that replaces the results from the givenpatternwith the values from the caption variables.static <C> @NonNull ComponentCaptionFormatter<C> Returns a caption formatter that replaces placeholders in the form of<placeholder>with the caption variables.static <C> @NonNull ComponentCaptionFormatter<C> Caption formatter fortranslatable components.Methods inherited from interface org.incendo.cloud.caption.CaptionFormatter
formatCaption, formatCaption
-
Method Details
-
miniMessage
Create a MiniMessage formatter with thedefault MiniMessage instanceand no extraTagResolvers.- Type Parameters:
C- command sender type- Returns:
- MiniMessage formatter
-
miniMessage
Create a MiniMessage formatter with the provided MiniMessage instance and no extraTagResolvers.- Type Parameters:
C- command sender type- Parameters:
miniMessage- MiniMessage instance- Returns:
- MiniMessage formatter
-
miniMessage
static <C> @NonNull ComponentCaptionFormatter<C> miniMessage(@NonNull MiniMessage miniMessage, @NonNull TagResolver @NonNull ... resolvers) Create a MiniMessage formatter with the provided MiniMessage instance and no extraTagResolvers.- Type Parameters:
C- command sender type- Parameters:
miniMessage- MiniMessage instanceresolvers- extra resolvers- Returns:
- MiniMessage formatter
-
translatable
Caption formatter fortranslatable components.- Type Parameters:
C- command sender type- Returns:
- caption formatter
-
patternReplacing
Returns a caption formatter that replaces the results from the givenpatternwith the values from the caption variables.The 1st capturing group will be used to determine the name of the variable to use for the replacement.
- Type Parameters:
C- the command sender type- Parameters:
pattern- the pattern- Returns:
- the formatter
-
placeholderReplacing
Returns a caption formatter that replaces placeholders in the form of<placeholder>with the caption variables.- Type Parameters:
C- the command sender type- Returns:
- the formatter
-