fix log spam lol

This commit is contained in:
Az committed 2026-11-07 15:53:09 -05:00
1 parent 94d68a34e3
commit 623cde27ee
2 files changed
+6 -5

No files matched your search

+1 -5
View File
@@ -158,11 +158,7 @@ public static class MiraEventManager
internal static void RegisterEvents(Type type, IMiraPlugin miraPlugin)
{
if (miraPlugin.ForceRegisterEvents)
{
Warning("For optimisation reasons, MiraAPI no longer automatically searches every type for events. Please use RegisterEventsAttribute moving forward.");
}
else if (!type.IsDefined<RegisterEventContainerAttribute>())
if (!miraPlugin.ForceRegisterEvents && !type.IsDefined<RegisterEventContainerAttribute>())
{
return;
}
@@ -140,6 +140,11 @@ public sealed class MiraPluginManager
[SuppressMessage("Minor Code Smell", "S3626:Jump statements should not be redundant", Justification = "Code consistency.")]
private static void ProcessAssemblyTypes(Assembly assembly, MiraPluginInfo info, BasePlugin basePlugin, IMiraPlugin plugin, List<Type> roles, bool isMira)
{
if (plugin.ForceRegisterEvents)
{
Warning("For optimisation reasons, MiraAPI no longer automatically searches every type for events. Please use RegisterEventsAttribute moving forward.");
}
foreach (var type in assembly.GetTypes())
{
if ((isMira && type.IsAbstract) || type.IsDefined<MiraIgnoreAttribute>())