mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-12-05 08:09: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>
|
||||||
/// 服务器启动登记
|
/// 服务器启动登记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -258,6 +258,9 @@ try
|
|||||||
|
|
||||||
Task order = Task.Factory.StartNew(GetConsoleOrder);
|
Task order = Task.Factory.StartNew(GetConsoleOrder);
|
||||||
|
|
||||||
|
otherobjs = [app, listener];
|
||||||
|
FunGameSystem.OnWebAPIStarted(otherobjs);
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user