diff --git a/NwPluginAPI/Events/EventManager.cs b/NwPluginAPI/Events/EventManager.cs index 692c796..d255e10 100644 --- a/NwPluginAPI/Events/EventManager.cs +++ b/NwPluginAPI/Events/EventManager.cs @@ -246,7 +246,7 @@ private static bool ValidateEvent(Type[] parameters, Type[] requiredParameters) public static void RegisterEvents(object plugin) { Type type = plugin.GetType(); - RegisterEvents(type, type); + RegisterEvents(type, plugin); } /// diff --git a/TemplatePlugin/MainClass.cs b/TemplatePlugin/MainClass.cs index 0d6e44f..4b0078d 100644 --- a/TemplatePlugin/MainClass.cs +++ b/TemplatePlugin/MainClass.cs @@ -6,6 +6,7 @@ using InventorySystem.Items.Firearms; using InventorySystem.Items.Radio; using InventorySystem.Items.Usables; + using LiteNetLib; using MapGeneration.Distributors; using PlayerRoles; using PlayerStatsSystem; @@ -14,6 +15,7 @@ using PluginAPI.Core.Interfaces; using PluginAPI.Enums; using PluginAPI.Events; + using System; using TemplatePlugin.Factory; using ItemPickupBase = InventorySystem.Items.Pickups.ItemPickupBase; @@ -254,7 +256,7 @@ void OnPlayerPickupScp330(MyPlayer plr, ItemPickupBase pickup) } [PluginEvent(ServerEventType.PlayerPreauth)] - void OnPreauth(string userid, string ipAddress, long expiration, CentralAuthPreauthFlags flags, string country, byte[] signature) + void OnPreauth(string userid, string ipAddress, long expiration, CentralAuthPreauthFlags flags, string country, byte[] signature, ConnectionRequest req, Int32 index) { Log.Info($"Player &6{userid}&r (&6{ipAddress}&r) preauthenticated from country &6{country}&r with central flags &6{flags}&r"); }