Added shazam module
This commit is contained in:
parent
e185786959
commit
b172069cba
1 changed files with 25 additions and 0 deletions
|
|
@ -1,5 +1,30 @@
|
||||||
|
import libminecraft
|
||||||
|
import libsignal
|
||||||
|
import libcommon
|
||||||
|
|
||||||
|
|
||||||
|
malasaurGamemode = "survival"
|
||||||
|
|
||||||
|
RetardsServer = libcommon.Group(
|
||||||
|
"Retards Server", "5PlbXaPmWZQkhmuyyC/fkWTy8K+BqomjK7byVDyxmpo=")
|
||||||
|
|
||||||
|
|
||||||
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: Set Malasaur's game mode to (.*) Mode")
|
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: Set Malasaur's game mode to (.*) Mode")
|
||||||
def malasaurSetGamemode(gamemode: str):
|
def malasaurSetGamemode(gamemode: str):
|
||||||
global malasaurGamemode
|
global malasaurGamemode
|
||||||
malasaurGamemode = gamemode.lower()
|
malasaurGamemode = gamemode.lower()
|
||||||
|
|
||||||
|
|
||||||
|
@libsignal.onMessage(RetardsServer)
|
||||||
|
def shazam(usr: str, msg: str):
|
||||||
|
if usr == "Malasaur" and "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")
|
||||||
|
elif malasaurGamemode == "creative":
|
||||||
|
libminecraft.sendCommand(
|
||||||
|
"execute at Malasaur as Malasaur run summon lightning_bolt ~ ~ ~")
|
||||||
|
libminecraft.sendCommand("gamemode survival Malasaur")
|
||||||
|
libminecraft.sendCommand("deop Malasaur")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue