From a7ed59cfbf8e1111dd739b7aecf6d6517c713011 Mon Sep 17 00:00:00 2001 From: NEMESIS13cz Date: Sat, 12 Sep 2015 21:06:49 +0200 Subject: [PATCH] Added a lag warning broadcast command --- misc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc.py b/misc.py index 51f68d1..ea7bf9a 100644 --- a/misc.py +++ b/misc.py @@ -256,6 +256,13 @@ def on_modules_command(sender, command, label, args): plugin_header(sender, "Modules") msg(sender, ", ".join([(("&a" if mod in shared["modules"] else "&c") + mod) for mod in shared["load_modules"]])) +@hook.command("warn") +def on_warn_command(sender, command, label, args): + broadcast(None, " &b= &2&lLag incoming! &r-%s" % sender.getDisplayName()) + +@hook.command("warnp") +def on_warnp_command(sender, command, label, args): + broadcast(None, " &b= &2&lPosible lag incoming! &r-%s" % sender.getDisplayName()) """ Something I'm planning for schematics @hook.event("player.PlayerCommandPreprocessEvent", "low")