Added player join and leave messages to Bridge

This commit is contained in:
Malasaur 2025-08-30 15:33:25 +02:00
parent a9ded5b8b3
commit 055674fd87

View file

@ -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)