Skip to content

Commit

Permalink
Merge pull request #117 from Controllerdestiny/main
Browse files Browse the repository at this point in the history
更新: 为HouseRegion插件添加重读配置
  • Loading branch information
Controllerdestiny authored May 14, 2024
2 parents a4a92fe + 980fabe commit 32ca27e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HouseRegion/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using TerrariaApi.Server;
using TShockAPI;
using TShockAPI.DB;
using TShockAPI.Hooks;


namespace HouseRegion
Expand Down Expand Up @@ -89,12 +90,15 @@ private void RH()//读取房屋
#region 插件的各种初始化
public override void Initialize()// 插件启动时,用于初始化各种狗子
{
RC(); RD(); GetDataHandlers.InitGetDataHandler();//初始化配置值,RH要放在服务器开成后再读不然世界ID读不出
RC();
RD();
GetDataHandlers.InitGetDataHandler();//初始化配置值,RH要放在服务器开成后再读不然世界ID读不出
ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);//钩住游戏初始化时
ServerApi.Hooks.NetGetData.Register(this, GetData);//收到数据
ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreetPlayer);//玩家进入服务器
ServerApi.Hooks.ServerLeave.Register(this, OnLeave);//玩家退出服务器
ServerApi.Hooks.GamePostInitialize.Register(this, PostInitialize);//地图读入后
GeneralHooks.ReloadEvent += (_) => RC();
}
protected override void Dispose(bool disposing)// 插件关闭时
{
Expand Down

0 comments on commit 32ca27e

Please sign in to comment.