public EventHandlers(PluginClass plugin) { Server.Get.Events.Round.RoundStartEvent += OnStart; Server.Get.Events.Round.RoundEndEvent += OnEnd; Server.Get.Events.Map.LCZDecontaminationEvent += OnDecon; Server.Get.Events.Map.WarheadDetonationEvent += OnNuke; Server.Get.Events.Scp.Scp106.Scp106ContainmentEvent += On106Contain; Server.Get.Events.Player.PlayerEnterFemurEvent += OnFemurEnter; }
public static Interface GetInterface() { PluginClass plugin = new PluginClass(); // We register handler for the Unloading event of the context that we are running in // so that we can perform cleanup of stuff that would otherwise prevent unloading // (Like freeing GCHandles for objects of types loaded into the unloadable AssemblyLoadContext, // terminating threads running code in assemblies loaded into the unloadable AssemblyLoadContext, // etc.) // NOTE: this is optional and likely not required for basic scenarios Assembly currentAssembly = Assembly.GetExecutingAssembly(); AssemblyLoadContext currentContext = AssemblyLoadContext.GetLoadContext(currentAssembly); currentContext.Unloading += OnPluginUnloadingRequested; return(plugin); }