From 5a757b7fb10a959c245d29b3eaddd69325f1ba55 Mon Sep 17 00:00:00 2001 From: Dico200 Date: Sun, 29 May 2016 20:56:29 +0200 Subject: [PATCH] Removed @hook.enable decs from modules, added them to the on_enable() method of main.py. --- imbusy.py | 1 - main.py | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/imbusy.py b/imbusy.py index 5382f32..05049c5 100644 --- a/imbusy.py +++ b/imbusy.py @@ -257,7 +257,6 @@ def on_player_command_preprocess(event): event.setCancelled(True) -@hook.enable def replace_ess_commands(): try: diff --git a/main.py b/main.py index 64405eb..fba0c5a 100644 --- a/main.py +++ b/main.py @@ -19,12 +19,17 @@ except: @hook.enable def on_enable(): + if "blockplacemods" in shared["modules"]: + shared["modules"]["blockplacemods"].schedule_torch_breaker() + if "imbusy" in shared["modules"]: + shared["modules"]["imbusy"].replace_ess_commands() info("RedstonerUtils enabled!") @hook.disable def on_disable(): - shared["modules"]["reports"].stop_reporting() + if "reports" in shared["modules"]: + shared["modules"]["reports"].stop_reporting() info("RedstonerUtils disabled!")