refactor config handling

This commit is contained in:
2025-07-14 08:11:10 +02:00
parent d53d71c6d9
commit ccaf44d50b
6 changed files with 56 additions and 88 deletions
+1 -3
View File
@@ -1,4 +1,3 @@
using System.Net;
using CustomPlayerEffects;
using LabApi.Events.Arguments.Scp049Events;
using LabApi.Events.Handlers;
@@ -153,12 +152,11 @@ public class NegromancerManager
private void OnScp049ResurrectedBody(Scp049ResurrectedBodyEventArgs ev)
{
var classManager = _plugin.ClassManager;
// Check if the reviver is a Negromancer
if (classManager == null ||
!IsNegromancer(ev.Player)) return;
ev.Target.SetRole(RoleTypeId.Scp106, RoleChangeReason.Respawn, RoleSpawnFlags.None);
classManager.ForceSpawn(ev.Target, _plugin.NegromancerShadowConfig, typeof(NegromancerShadowConfig), null);
classManager.ForceSpawn(ev.Target, classManager.GetConfig<NegromancerShadowConfig>(), typeof(NegromancerShadowConfig), null);
}
}