Intercepts player messages and sends them to the specified webhook URL via a POST request (parameters: nick, message, password).
Intercepts player messages and sends them to the specified webhook URL via a POST request (parameters: nick, message, password).
webhook-url: "https://your-server/endpoint"password: "your_password"# optional: no-permission-message, config-reloaded, main-text/c2h reload- reload the config (requiresc2h.reloadpermission)./c2h send ip json- send post (requiresc2h.sendpermission).
c2h.reload- access to reload.c2h.send- access to /c2h send
Uses aiohttp
asyncdefminecraft(request: aiohttp.web.Request):
data=awaitrequest.post()
ifdata.get("password") !=config.tokens.chattohttp:
logger.info("Invalid password")
returnaiohttp.web.Response(text="Password is not valid", status=401)
nick=data.get("nick")
message=data.get("message")
ifnotformatter.is_valid_mc_nick(nick):
returnaiohttp.web.Response(text="Nick is not valid", status=406)
logger.info(f"{nick} said: {message}")
returnaiohttp.web.Response(text="ok")Install Maven and runmvn clean package
The plugin uses SemVer - <major>.<minor>.<patch>
- major - incompatible changes
- minor - compatible feature changes
- patch - non-functional changes (bugfixes)