forked from SCP-SL-Plugin-YongAnTeam/YongAnFrame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
YongAnFramePlugin.cs
48 lines (45 loc) · 2.35 KB
/
YongAnFramePlugin.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
using Exiled.API.Enums;
using Exiled.API.Features;
using Exiled.API.Interfaces;
using Exiled.Events.Commands.Reload;
using SCPSLAudioApi;
using YongAnFrame.Players;
using YongAnFrame.Roles;
namespace YongAnFrame
{
/// <summary>
/// 插件的驱动
/// </summary>
public sealed class YongAnFramePlugin : Plugin<Config, Translation>
{
private static YongAnFramePlugin instance;
/// <summary>
/// 获取单例
/// </summary>
public static YongAnFramePlugin Instance => instance;
///<inheritdoc/>
public override PluginPriority Priority => PluginPriority.First;
///<inheritdoc/>
public override bool IgnoreRequiredVersionCheck => true;
///<inheritdoc/>
public override void OnEnabled()
{
instance = this;
Log.Info("\r\n __ __ ______ __ __ ______ ______ __ __ \r\n/\\ \\_\\ \\ /\\ __ \\ /\\ \"-.\\ \\ /\\ ___\\ /\\ __ \\ /\\ \"-.\\ \\ \r\n\\ \\____ \\ \\ \\ \\/\\ \\ \\ \\ \\-. \\ \\ \\ \\__ \\ \\ \\ __ \\ \\ \\ \\-. \\ \r\n \\/\\_____\\ \\ \\_____\\ \\ \\_\\\\\"\\_\\ \\ \\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\\\"\\_\\ \r\n \\/_____/ \\/_____/ \\/_/ \\/_/ \\/_____/ \\/_/\\/_/ \\/_/ \\/_/ \r\n \r\n ______ ______ ______ __ __ ______ \r\n/\\ ___\\ /\\ == \\ /\\ __ \\ /\\ \"-./ \\ /\\ ___\\ \r\n\\ \\ __\\ \\ \\ __< \\ \\ __ \\ \\ \\ \\-./\\ \\ \\ \\ __\\ \r\n \\ \\_\\ \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\ \\_\\ \\ \\_\\ \\ \\_____\\ \r\n \\/_/ \\/_/ /_/ \\/_/\\/_/ \\/_/ \\/_/ \\/_____/ \r\n \r\n ");
Log.Info("============System============");
FramePlayer.SubscribeStaticEvents();
MusicManager.Instance.Init();
CustomRolePlus.SubscribeStaticEvents();
Startup.SetupDependencies();
base.OnEnabled();
}
///<inheritdoc/>
public override void OnDisabled()
{
instance = null;
FramePlayer.UnsubscribeStaticEvents();
CustomRolePlus.UnsubscribeStaticEvents();
base.OnDisabled();
}
}
}