mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-12-05 00:06:03 +00:00
添加 Web API 的 OnWebAPIStarted 事件
This commit is contained in:
parent
620a398f47
commit
1823e00669
@ -239,6 +239,21 @@ namespace Milimoe.FunGame.Server.Services
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Web API 启动完成回调
|
||||
/// </summary>
|
||||
public static void OnWebAPIStarted(params object[] objs)
|
||||
{
|
||||
try
|
||||
{
|
||||
WebAPIPluginLoader?.OnWebAPIStarted(objs);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ServerHelper.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务器启动登记
|
||||
/// </summary>
|
||||
|
||||
@ -258,6 +258,9 @@ try
|
||||
|
||||
Task order = Task.Factory.StartNew(GetConsoleOrder);
|
||||
|
||||
otherobjs = [app, listener];
|
||||
FunGameSystem.OnWebAPIStarted(otherobjs);
|
||||
|
||||
app.Run();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user