-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.cs
50 lines (37 loc) · 1.19 KB
/
Plugin.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
using DebugTools.Events;
using Exiled.API.Features;
using System;
namespace DebugTools
{
public class Plugin : Plugin<Config, Translation>
{
public override string Name => "Debug Tools";
public override string Author => "Logic_Gun";
//public override Version RequiredExiledVersion => new(9, 0, 0);
public override Version Version => new(1, 0, 2);
public static Plugin Instance;
private ServerHandler _serverHandler;
public override void OnEnabled()
{
Instance = this;
base.OnEnabled();
}
public override void OnDisabled()
{
Instance = null;
base.OnDisabled();
}
protected override void SubscribeEvents()
{
_serverHandler = new();
Exiled.Events.Handlers.Server.WaitingForPlayers += _serverHandler.OnWaitingForPlayers;
base.SubscribeEvents();
}
protected override void UnsubscribeEvents()
{
Exiled.Events.Handlers.Server.WaitingForPlayers += _serverHandler.OnWaitingForPlayers;
_serverHandler = null;
base.UnsubscribeEvents();
}
}
}