public override void Initialize() { InvPlayer.Initialize(); if (!File.Exists(config)) { var str = File.Create(".\\" + config); str.Close(); str.Dispose(); } using (StreamReader sr = new StreamReader(config)) { string[] ids = sr.ReadToEnd().Split(' '); int i = 0; foreach (string s in ids) { if (s.Length > 0) { if (int.TryParse(s, out i)) { item.Add(i); } } } } ServerApi.Hooks.ServerJoin.Register(this, OnJoin); ServerApi.Hooks.NetGetData.Register(this, OnGetData); ServerApi.Hooks.ServerCommand.Register(this, OnCommand); ServerApi.Hooks.GameUpdate.Register(this, OnUpdate); ServerApi.Hooks.ServerLeave.Register(this, OnLeave); }