Trigger an event across all addons. This API is discouraged and may be deprecated in the future. Use `trigger_event()` instead, which provides the same functionality but supports async hooks.
(self, event: hooks.Hook)
| 294 | return |
| 295 | |
| 296 | def trigger(self, event: hooks.Hook): |
| 297 | """ |
| 298 | Trigger an event across all addons. |
| 299 | |
| 300 | This API is discouraged and may be deprecated in the future. |
| 301 | Use `trigger_event()` instead, which provides the same functionality but supports async hooks. |
| 302 | """ |
| 303 | for i in self.chain: |
| 304 | try: |
| 305 | with safecall(): |
| 306 | self.invoke_addon_sync(i, event) |
| 307 | except exceptions.AddonHalt: |
| 308 | return |