diff --git a/ExiledUtils_REMAKE/EventHandlers.cs b/ExiledUtils_REMAKE/EventHandlers.cs index bbe9475..95e867b 100644 --- a/ExiledUtils_REMAKE/EventHandlers.cs +++ b/ExiledUtils_REMAKE/EventHandlers.cs @@ -7,6 +7,7 @@ using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp049; using Exiled.Events.EventArgs.Scp096; +using LiteNetLib; using MEC; using PlayerRoles; using UnityEngine; @@ -107,7 +108,7 @@ public void OnPreAuth(PreAuthenticatingEventArgs ev) if (group != null) { if (MainClass.hub.Config.ReservedGroups.Contains(group.GetKey())) - ev.Request.Accept(); + ev.Request.Result = ConnectionRequestResult.Accept; Log.Debug($"{ev.UserId}: {group} || {ev.IsAllowed}"); } } diff --git a/ExiledUtils_REMAKE/MainClass.cs b/ExiledUtils_REMAKE/MainClass.cs index da43878..d39114a 100644 --- a/ExiledUtils_REMAKE/MainClass.cs +++ b/ExiledUtils_REMAKE/MainClass.cs @@ -1,10 +1,13 @@ using System; using System.Collections.Generic; +using System.Linq; using Exiled.API.Features; +using Exiled.Loader; using ExiledUtilsRemake_PlayerHandler = Exiled.Events.Handlers.Player; using ExiledUtilsRemake_Scp096Handler = Exiled.Events.Handlers.Scp096; using ExiledUtilsRemake_Scp049Handler = Exiled.Events.Handlers.Scp049; using ExiledUtilsRemake_Scp106Handler = Exiled.Events.Handlers.Scp106; +using ExiledUtilsRemake_ServerHandler = Exiled.Events.Handlers.Server; using ExiledUtils_REMAKE.Enums; using HarmonyLib; @@ -16,12 +19,14 @@ public class MainClass : Plugin public override string Author { get; } = "xNexus-ACS"; public override string Name { get; } = "ExiledUtils-Remake"; public override string Prefix { get; } = "exiled_utils_remake"; - public override Version Version { get; } = new Version(5, 0, 1); + public override Version Version { get; } = new Version(5, 0, 2); public override Version RequiredExiledVersion { get; } = new Version(6, 0, 0); public const VersionType type = VersionType.RemakeBeta; private static Harmony harmony; + public bool CommonUtilsDetector = Loader.Plugins.Any(p => p.Name == "Common Utilities" && p.Config.IsEnabled); + public List JailedPlayers = new(); public EventHandlers Ev { get; private set; } @@ -65,6 +70,8 @@ public override void OnDisabled() ExiledUtilsRemake_PlayerHandler.PreAuthenticating -= Ev.OnPreAuth; ExiledUtilsRemake_PlayerHandler.ChangingRole -= Ev.OnChangingRole; ExiledUtilsRemake_PlayerHandler.Verified -= Ev.OnVerified; + + JailedPlayers.Clear(); Ev = null; hub = null; diff --git a/ExiledUtils_REMAKE/Properties/AssemblyInfo.cs b/ExiledUtils_REMAKE/Properties/AssemblyInfo.cs index 42d04e0..950ad03 100644 --- a/ExiledUtils_REMAKE/Properties/AssemblyInfo.cs +++ b/ExiledUtils_REMAKE/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.1.0")] -[assembly: AssemblyFileVersion("5.0.1.0")] +[assembly: AssemblyVersion("5.0.2.0")] +[assembly: AssemblyFileVersion("5.0.2.0")]