This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
UIURescueSquad.cs
51 lines (39 loc) · 1.64 KB
/
UIURescueSquad.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using Exiled.API.Features;
using Exiled.CustomRoles.API;
using Exiled.CustomRoles.API.Features;
using MapEvent = Exiled.Events.Handlers.Map;
using ServerEvent = Exiled.Events.Handlers.Server;
namespace UIURescueSquad
{
public class UIURescueSquad : Plugin<Configs.Config>
{
public override string Name { get; } = "UIURescueSquad";
public override string Author { get; } = "JesusQC, Michal78900, maintained by Marco15453";
public override string Prefix { get; } = "UIURescueSquad";
public override Version Version { get; } = new Version(5, 3, 0);
public override Version RequiredExiledVersion => new Version(7, 1, 0);
public bool IsSpawnable = false;
private EventHandlers eventHandlers;
public override void OnEnabled()
{
Config.UiuSoldier.Register();
Config.UiuAgent.Register();
Config.UiuLeader.Register();
eventHandlers = new EventHandlers(this);
ServerEvent.RoundStarted += eventHandlers.OnRoundStarted;
ServerEvent.RespawningTeam += eventHandlers.OnRespawningTeam;
MapEvent.AnnouncingNtfEntrance += eventHandlers.OnAnnouncingNtfEntrance;
base.OnEnabled();
}
public override void OnDisabled()
{
CustomRole.UnregisterRoles();
ServerEvent.RoundStarted -= eventHandlers.OnRoundStarted;
ServerEvent.RespawningTeam -= eventHandlers.OnRespawningTeam;
MapEvent.AnnouncingNtfEntrance -= eventHandlers.OnAnnouncingNtfEntrance;
eventHandlers = null;
base.OnDisabled();
}
}
}