From b836c31658f6212464699e1d99ea8c2bc6162a2c Mon Sep 17 00:00:00 2001 From: alemidev Date: Sat, 4 Dec 2021 02:49:50 +0100 Subject: [PATCH] fix order of init/cleanup execution --- treepuncher/treepuncher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/treepuncher/treepuncher.py b/treepuncher/treepuncher.py index 44b0d0c..e871429 100644 --- a/treepuncher/treepuncher.py +++ b/treepuncher/treepuncher.py @@ -80,16 +80,16 @@ class Treepuncher(MinecraftClient): self.scheduler.start(paused=True) async def start(self): - await super().start() - self.scheduler.resume() for m in self.modules: await m.initialize(self) + await super().start() + self.scheduler.resume() async def stop(self, force:bool=False): self.scheduler.pause() + await super().stop(force=force) for m in self.modules: await m.cleanup(self) - await super().stop(force=force) def add(self, module:LogicModule): module.register(self)