-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPlugin.cs
More file actions
54 lines (42 loc) · 1.56 KB
/
Plugin.cs
File metadata and controls
54 lines (42 loc) · 1.56 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using Discord;
using Exiled.API.Features;
using Exiled.CustomItems.API.Features;
using UnityEngine;
using UserSettings.ServerSpecific;
namespace ExtendedItems
{
// ReSharper disable once ClassNeverInstantiated.Global
public class Plugin : Plugin<Config>
{
public static Plugin? Instance;
private List<ServerSpecificSettingBase>? _settings;
public override string Prefix => "Extended Items";
public override string Name => "Extended Items";
public override string Author => "Noobest1001";
public override Version Version => new(3, 3, 0, 0);
public override Version RequiredExiledVersion => new(9, 7, 0);
public override void OnEnabled()
{
Instance = this;
Ssss.Register();
Log.Send("Registering items", LogLevel.Info, ConsoleColor.DarkYellow);
CustomItem.RegisterItems(overrideClass: Config);
_settings =
[
new SSGroupHeader(10, "Extended Items"),
new SSKeybindSetting(24, "C4 Detonation", KeyCode.Delete, hint: "Explodes all C4 placed by you"),
];
ServerSpecificSettingsSync.DefinedSettings = _settings.ToArray();
base.OnEnabled();
}
public override void OnDisabled()
{
Log.Send("Unregistering items", LogLevel.Info, ConsoleColor.DarkYellow);
CustomItem.UnregisterItems();
Ssss.Unregister();
_settings = null;
Instance = null;
base.OnDisabled();
}
}
}