-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.cs
52 lines (40 loc) · 1.29 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
51
52
using Exiled.API.Enums;
using Exiled.API.Features;
using Exiled.CustomRoles.API;
using Scp_507.Events;
using System;
using System.Collections.Generic;
namespace Scp_507
{
public class Plugin : Plugin<Config, Translation>
{
public override string Name => "Scp-507";
public override string Author => "Logic_Gun";
//public override Version RequiredExiledVersion => new(8, 9, 11);
public override Version Version => new(1, 0, 1);
public static Plugin Instance;
internal static List<RoomType> StupidRooms = [RoomType.HczTesla, RoomType.HczTestRoom];
public override void OnEnabled()
{
Instance = this;
Instance.Config.Scp507.Register();
SubscribeEvents();
base.OnEnabled();
}
public override void OnDisabled()
{
UnsubscribeEvents();
Instance.Config.Scp507.Unregister();
Instance = null;
base.OnDisabled();
}
private void SubscribeEvents()
{
Exiled.Events.Handlers.Player.ChangingRole += PlayerHandler.OnChangingRole;
}
private void UnsubscribeEvents()
{
Exiled.Events.Handlers.Player.ChangingRole -= PlayerHandler.OnChangingRole;
}
}
}