generated from xpdustry/template-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Phinner edited this page Dec 14, 2024
·
7 revisions
This plugin requires at least :
-
Mindustry v146
-
Java 17
-
DistributorAPI v4+
-
SLF4MD v1+
-
KotlinRuntime latest
The configuration file is located at /config/mods/flex/config.yaml
:
# Builtin flex hooks configuration
hooks:
# Redirect chat processing to flex (beware, it overrides the "send message" packet listener)
# To change the format, define the template "mindustry_chat"
chat: false
# Use flex for displaying player join messages (beware, it will always set "showConnectMessages" to false to avoid conflicts)
# To change the format, define the template "mindustry_join"
join: false
# Use flex for displaying player quit messages (beware, it will always set "showConnectMessages" to false to avoid conflicts)
# To change the format, define the template "mindustry_quit"
quit: false
# Name hook configuration
# To change the format, define the template "mindustry_name"
name:
# If enabled, flex will update the display name of all online players periodically
enabled: false
# The update interval of the name hook
update-interval: "500ms"
# Translator configuration
translator:
# Whether the built-in message translation processor should be registered
register-message-processor: true
# The translation backend, choose
backend:
# The default back-end, all translations will fail
"None"
# A caching translator, I heavily recommend that you use it to wrap one of the concrete translators below
# How much time a successful translation should be cached
success-retention: "10m"
# How much time a failed translation should be cached
failure-retention: "10s"
# The maximum size of cached translations
maximum-size: 1000
# The wrapped translator whose results are cached
caching-translator: "..."
# DeepL, commercial translation solution (https://www.deepl.com)
# Provides excellent quality translations, their free tier is ideal for small to medium activity servers
# Your DeepL API token
deepl-api-key: "xxx"
# LibreTranslate, self-hosted translation solution (https://github.com/LibreTranslate/LibreTranslate)
# Translation quality is medium, ideal for high activity servers with the means to host an instance
# The LibreTranslate API endpoint
lt-endpoint: "https://translation.example.com/"
# Your LibreTranslate API token (optional if you use one of the free instances
lt-api-key: "xxx"
# Statically defined templates
templates:
# The name of your template
greeting:
# The steps composing your template
steps:
# A simple text step
- text: "Hello "
# This step has a filter, it will only append the text if the subject is an online player
- if: "player:name"
text: "%player:name%"
# Let's add the same filter with a "not" condition so we can still have a fallback name
- if: { not: "player:name" }
text: "Unknown"
# Finish up
- text: ", nice to meet you"
# An example custom player name template, see how simple and powerful it is
mindustry_name:
steps:
- if: "my_processor:is_admin"
text: "[red]<ADMIN> "
- text: "[%player:color%]%player:name_colored%"