From 2c063d638f2862472d0bf6887b087c97c8b668a2 Mon Sep 17 00:00:00 2001 From: Dico200 Date: Mon, 13 Apr 2015 18:16:40 +0200 Subject: [PATCH] Tweaks in imout, primarily making player vanish --- imout.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/imout.py b/imout.py index e7ab99d..bb10204 100644 --- a/imout.py +++ b/imout.py @@ -6,12 +6,16 @@ imout_toggle_list = [] @hook.command("imout") def on_imout_command(sender, command, label, args): + if not is_player(sender): + msg(sender, "&cThis command can't be run from the console") + return True if sender.hasPermission("utils.imout"): name = sender.getName() symbol = "&a&l+" if name in imout_toggle_list: msg(sender, "&eWelcome back! You are no longer hidden") msg(sender, "&6We disabled /act for you!") + runas(sender, "vanish off") if name in imout_toggle_list: imout_toggle_list.remove(name) if name in ac_toggle_list: @@ -20,8 +24,10 @@ def on_imout_command(sender, command, label, args): symbol = "&c&l-" msg(sender, "&eYou just left... Or didn't you?") imout_toggle_list.append(name) + runas(sender, "vanish on") if name not in ac_toggle_list: msg(sender, "&6We enabled /act for you!") ac_toggle_list.append(name) broadcast(None, "%s &7%s" % (symbol, name)) + return True