Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import minqlx, time
- class ExamplePlugin(minqlx.Plugin):
- def __init__(self):
- self.add_hook("unload", self.handle_unload)
- self.running = True
- self.run_loop()
- @minqlx.thread
- def run_loop(self):
- if (not self.running): break
- #put your loop code here
- time.sleep(1)
- def handle_unload(self, plugin):
- if (plugin == self.__class__.__name__):
- self.running = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement