コード例 #1
0
ファイル: Restful.cs プロジェクト: Pryaxis/Restful
        /// <inheritdoc/>
        public override void Initialize()
        {
            ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);

            Config       = ConfigFile.Read();
            Api          = new SecureRest(Netplay.ServerIP, Config.Port);
            Manager      = new Legacy.RestManager(Api);
            ChatCommands = new ChatCommands();
        }
コード例 #2
0
ファイル: Restful.cs プロジェクト: Pryaxis/Restful
 /// <summary>
 /// Occurs after the game has finished initializing.
 /// </summary>
 /// <param name="args">The EventArgs object.</param>
 private void OnInitialize(EventArgs args)
 {
     Manager.RegisterRestfulCommands();
     Api.Start();
     ChatCommands.RegisterAll();
 }