Package me.croabeast.takion.format
Interface TextFormat<T>
- Type Parameters:
T- the result type produced by this format when applied to input text
- All Superinterfaces:
Format<T>
- All Known Subinterfaces:
StringFormat
A specialization of
Format for formats that operate solely on the input string,
without regard to player context.
TextFormat implementations define a single abstract accept(String) method
that transforms or interprets the provided text and returns a result of type T.
The context‑aware accept overloads that take a Player simply delegate to
the string‑only variant by default.
- See Also:
-
Method Summary
Methods inherited from interface me.croabeast.takion.format.Format
getRegex, isFormatted, matcher, removeFormat, toFormattedString
-
Method Details
-
accept
Applies this format to the given text and returns the transformed result.Implementations must override this method to perform the desired formatting, parsing, or transformation logic on the raw input string.
-
accept
Applies this format to the given text for a single player context.The default implementation ignores the
playerargument and delegates directly toaccept(String). Override only if your format requires player-specific handling when a singlePlayeris provided.
-