KlarityMiddleware

Interface for middlewares. Middlewares are codes that can modify the output of Klarity.translate() after the script has been parsed. This could be useful to add custom parsing, for example adding color code support in Minecraft plugins.

Please note, that whatever the middleware outputs will become the output of Klarity.translate(). There can also be multiple middlewares, they are called in the order of registration. Every middleware will get the output of the previous one as an input.

Author

TOTHTOMI

Since

Jul. 23, 2023

Functions

Link copied to clipboard
open fun modify(input: String): String

Middleware function