Renamed to event handler

This commit is contained in:
David Higueros committed 2026-11-03 13:23:59 -07:00
1 parent d622caaf70
commit af38fade3d
1 file changed
+4 -4
+4 -4
View File
@@ -123,7 +123,7 @@ public sealed class MiraPluginManager
if ((isMira && type.IsAbstract) || type.GetCustomAttribute<MiraIgnoreAttribute>() != null)
continue;
RegisterEvents(type);
RegisterEventHandlers(type);
if (RegisterModifier(type, info))
continue;
@@ -160,7 +160,7 @@ public sealed class MiraPluginManager
}
}
private static void RegisterEvents(Type type)
private static void RegisterEventHandlers(Type type)
{
foreach (var method in AccessTools.GetDeclaredMethods(type))
{
@@ -171,14 +171,14 @@ public sealed class MiraPluginManager
if (!method.IsStatic)
{
Error($"Event method {method.Name} in {type.Name} must be static.");
Error($"Event handler method {method.Name} in {type.Name} must be static.");
continue;
}
var parameters = method.GetParameters();
if (parameters.Length != 1 || !parameters[0].ParameterType.IsSubclassOf(typeof(MiraEvent)))
{
Error($"Invalid event registration method {method.Name} in {type.Name}");
Error($"Invalid event handler registration: method {method.Name} in {type.Name}");
continue;
}