This repository was archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRoundMVP.cs
More file actions
40 lines (34 loc) · 1.41 KB
/
RoundMVP.cs
File metadata and controls
40 lines (34 loc) · 1.41 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
namespace RoundMVP
{
using Exiled.API.Features;
public class Plugin : Plugin<Config>
{
public override string Name => "RoundMVP";
public override string Prefix => "RoundMVP";
public override string Author => "@misfiy";
public override Version RequiredExiledVersion => new(8, 2, 1);
public override Version Version => new(1, 2, 4);
public static Plugin Instance;
private Handler handler;
public override void OnEnabled()
{
Instance = this;
handler = new Handler();
Exiled.Events.Handlers.Player.Died += handler.OnDied;
Exiled.Events.Handlers.Player.Spawned += handler.OnSpawned;
Exiled.Events.Handlers.Server.WaitingForPlayers += handler.OnWaiting;
Exiled.Events.Handlers.Server.RoundEnded += handler.OnRoundEnd;
base.OnEnabled();
}
public override void OnDisabled()
{
Exiled.Events.Handlers.Player.Died -= handler.OnDied;
Exiled.Events.Handlers.Player.Spawned -= handler.OnSpawned;
Exiled.Events.Handlers.Server.WaitingForPlayers -= handler.OnWaiting;
Exiled.Events.Handlers.Server.RoundEnded -= handler.OnRoundEnd;
handler = null!;
Instance = null!;
base.OnDisabled();
}
}
}