From 6540f8b7bbf0c5a998d8e98e29caba2b0490f507 Mon Sep 17 00:00:00 2001 From: David Higueros <111460331+TheDavSmasher@users.noreply.github.com> Date: Sun, 6 Sep 2026 16:40:21 -0600 Subject: [PATCH] Made EventHandler InvokeEvent extension methods --- MiraAPI/Events/MiraEventManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MiraAPI/Events/MiraEventManager.cs b/MiraAPI/Events/MiraEventManager.cs index 30ffb74..5aa3c8c 100644 --- a/MiraAPI/Events/MiraEventManager.cs +++ b/MiraAPI/Events/MiraEventManager.cs @@ -17,7 +17,7 @@ public static class MiraEventManager /// The instance. /// Type of Event. /// If there was an event handler invoked for this event, return . Otherwise, return . - public static bool InvokeEvent(T eventInstance) where T : MiraEvent + public static bool InvokeEvent(this T eventInstance) where T : MiraEvent { EventWrappers.TryGetValue(typeof(T), out var handlers); if (handlers == null || handlers.Count == 0) @@ -46,7 +46,7 @@ public static class MiraEventManager /// The instance. /// The type to use for handler lookup. /// If there was an event handler invoked for this event, return . Otherwise, return . - public static bool InvokeEvent(MiraEvent eventInstance, Type type) + public static bool InvokeEvent(this MiraEvent eventInstance, Type type) { EventWrappers.TryGetValue(type, out var handlers); if (handlers == null || handlers.Count == 0)