diff --git a/modules/minecraft_signal_bridge.py b/modules/minecraft_signal_bridge.py index 83cf1cf..40d261d 100644 --- a/modules/minecraft_signal_bridge.py +++ b/modules/minecraft_signal_bridge.py @@ -26,3 +26,12 @@ def minecraftToSignal(usr: str, msg: str): def signalToMinecraft(usr: str, msg: str): usr = players.get(usr, usr) libminecraft.sendCommand(f'tellraw @a "<{usr}> {msg}"') + + +@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: (.*) joined the game") +def minecraftPlayerJoin(usr: str): + libsignal.sendMessage(f"{usr} joined the game.", RetardsServer) + +@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: (.*) left the game") +def minecraftPlayerLeave(usr: str): + libsignal.sendMessage(f"{usr} left the game.", RetardsServer)