refactor config handling
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user