A chat plugin for Velocity that does live translation and much more.
- Velocity 4, the plugin is built against the 4.x API and won't load on a 3.x proxy
- Java 25
- A MySQL or MariaDB database, it's where player preferences, mails and supported locales live
- Redis, only if you set
cache-providerto redis
mvn package -B
The proxy cancels the message a player sends and re-emits its own copy to everyone, translated per recipient. That's why every chat line you see comes from the proxy and not from the backend server.
Because a signed message can't be cancelled, the signature is stripped from incoming chat before Velocity reads it.
This is what strip-chat-signatures does, and turning it off breaks chat on 1.19 and newer clients.
Messages coming from a backend server are intercepted on their way out and translated the same way, so a plugin message on the survival server reaches a French player in French.
Keep in mind that a message carrying a click event is forwarded untouched. Translating it would flatten it and the menu would stop being clickable.
Everything lives in config.yml, in the plugins/redcraftchat folder of your proxy (Velocity names that folder after the plugin id, not after the jar).
translation-enabledturns the whole thing on and off. When it's off, messages are still relayed, just not translated.chat-translation-provideris what translates player chat,upstream-translation-providerdoes the same for messages coming from backend servers. Both acceptclaude,deepl,modernmtandmodernmt-free.pretranslate-ui-enabledtranslates every menu and button into each supported language on startup. The cache never expires, so it costs one pass the first time and nothing after.
By default the provider is claude, because the free ModernMT endpoint stopped returning translations.
Set claude-token and you're done, claude-model defaults to a Haiku model which is fast enough for chat.
server-display-namesmaps a server name to what players should see:hub: '&6Hub'. It's used in join and leave messages, in the chat prefix and in the Discord bridge.
If a server isn't listed, the plugin pings it and uses the first line of its motd, and falls back to the name the proxy registers it under. Please notice that a motd can't carry colours, so list a server here if you want it coloured.
discord-enabledanddiscord-tokenare all you need to bridge chat. When the token is empty the bridge is skipped and the rest of the plugin still works.discord-channel-minecraftis the channel that mirrors in game chat.
The bot invite link is https://discord.com/oauth2/authorize?client_id=<client_id>&scope=bot&permissions=8
database-uri,database-usernameanddatabase-passwordpoint at your database.player-provider,mail-provider,supported-locales-providerandscheduled-announcements-providereach acceptdatabaseorapi.cache-providerismemoryorredis. Use redis if you run more than one proxy, otherwise memory is fine.
/langopens the language selector, click a language to enable it and the checkbox to make it your main one/msg,/rand/meare the usual ones, they go through the proxy so they work across servers/mailis a small inbox,/mail send <player> <message>sends one/commandspyshows the commands other players run,/broadcastsends a message to the whole network/redcraftchatis the admin command
You are free to suggest changes by opening an issue ticket.
You can also open PRs, remember to bump the version in pom.xml and in the @Plugin annotation before opening a pull request.