ModsJava
ChatBackendAddon
Java mod listed for Minecraft 1.12. Download on the author's site.
⬇ Download on SpigotThis plugin allows you to preprocess
PistonChat messages on an external backend server.
Config
If you don't have DNS load balancer you could add the addresses of the replicas manually or just have one server to handle all requests. Retries field specifies how many times the plugin will try to process one message if it fails.
Backend server example (Node)
You can write it in any language as long as the server accepts POST requests and returns a JSON object which contains at least an "allow" boolean field.
Building from source
Config
If you don't have DNS load balancer you could add the addresses of the replicas manually or just have one server to handle all requests. Retries field specifies how many times the plugin will try to process one message if it fails.
Code (YAML):
enable
: true
allow-on-error : true
timeout : 1000
retries : 1
enable-metrics : true
servers : # load balanced with round-robin
- http://localhost:25501
allow-on-error : true
timeout : 1000
retries : 1
enable-metrics : true
servers : # load balanced with round-robin
- http://localhost:25501
Backend server example (Node)
You can write it in any language as long as the server accepts POST requests and returns a JSON object which contains at least an "allow" boolean field.
Code (Javascript):
const fastify
= require
(
'fastify'
)
(
{ logger
:
true
}
)
;
fastify. post ( '/' , async (request , reply ) => {
const { username , message } = request. body ;
console. log ( { username , message } ) ;
return {
allowed : !message. match ( /1\s*\+\s*1/g ) ,
replacement : message. match ( /2/g ) ? message. replace ( /2/g , '3' ) : null
} ;
} ) ;
const start = async ( ) => {
try {
await fastify. listen ( 25501 ) ;
} catch (err ) {
fastify. log. error (err ) ;
process. exit ( 1 ) ;
}
}
start ( ) ;
fastify. post ( '/' , async (request , reply ) => {
const { username , message } = request. body ;
console. log ( { username , message } ) ;
return {
allowed : !message. match ( /1\s*\+\s*1/g ) ,
replacement : message. match ( /2/g ) ? message. replace ( /2/g , '3' ) : null
} ;
} ) ;
const start = async ( ) => {
try {
await fastify. listen ( 25501 ) ;
} catch (err ) {
fastify. log. error (err ) ;
process. exit ( 1 ) ;
}
}
start ( ) ;
Building from source
Code (Text):
git clone https://github.com/comendantmc/ChatBackendAddon.git
cd ChatBackendAddon
mvn package
cd ChatBackendAddon
mvn package
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.12
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
ChatBackendAddon is a free Minecraft Java mod. Compatible with Minecraft 1.12. Downloaded 110 times (via Spigot). Download it and open it directly in the game.