Fixed shazam module

This commit is contained in:
Malasaur 2025-08-30 14:01:57 +02:00
parent b172069cba
commit 789f1167a7

View file

@ -15,16 +15,20 @@ def malasaurSetGamemode(gamemode: str):
malasaurGamemode = gamemode.lower()
@libsignal.onMessage(RetardsServer)
def shazam(usr: str, msg: str):
if usr == "Malasaur" and "shazam" in msg.lower():
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: <Malasaur> (.*)")
def shazam(msg: str):
global malasaurGamemode
if "shazam" in msg.lower():
if malasaurGamemode == "survival":
libminecraft.sendCommand("gamemode creative Malasaur")
libminecraft.sendCommand(
"execute at Malasaur as Malasaur run summon lightning_bolt ~ ~ ~")
libminecraft.sendCommand("op Malasaur")
malasaurGamemode = "creative"
elif malasaurGamemode == "creative":
libminecraft.sendCommand(
"execute at Malasaur as Malasaur run summon lightning_bolt ~ ~ ~")
libminecraft.sendCommand("gamemode survival Malasaur")
libminecraft.sendCommand("deop Malasaur")
malasaurGamemode = "survival"