-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlugin.cs
More file actions
40 lines (32 loc) · 1.15 KB
/
Plugin.cs
File metadata and controls
40 lines (32 loc) · 1.15 KB
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
using Server = Exiled.Events.Handlers.Server;
using Player = Exiled.Events.EventArgs.Player;
using Exiled.API.Features;
namespace RoleSwap
{
class Plugin : Plugin<Config>
{
public override string Prefix => "Cactus-Patch";
public override string Name => "Arrested Development";
public override string Author => "Noobest1001";
public override Version Version => new(1, 1, 0);
public override Version RequiredExiledVersion => new(9, 5, 0);
public static Plugin? Instance;
private EventHandlers? eventHandlers;
public override void OnEnabled()
{
Instance = this;
eventHandlers = new EventHandlers(this);
Server.RoundStarted += eventHandlers.OnRoundStarted;
Server.EndingRound += eventHandlers.OnEndingRound;
base.OnEnabled();
}
public override void OnDisabled()
{
Server.RoundStarted -= eventHandlers!.OnRoundStarted;
Server.EndingRound -= eventHandlers!.OnEndingRound;
Instance = null;
eventHandlers = null;
base.OnDisabled();
}
}
}