Load() public static method

public static Load ( ) : void
return void
Exemplo n.º 1
0
        private void OnUpdate()
        {
            if ((DateTime.UtcNow - LastSave).TotalMinutes >= 5)
            {
                try
                {
                    ChestManager.Save(); //save chests
                }
                catch (Exception ex)     //we don't want the world to fail to save.
                {
                    Log.Write(ex.ToString(), LogLevel.Error);
                }
                finally
                {
                    LastSave = DateTime.UtcNow;
                }
            }
            if (Init)
            {
                return;
            }
            Log.Initialize(ChestManager.ChestLogPath, false);
            Log.Write("Initiating ChestControl...", LogLevel.Info);
            ChestManager.Load();
            Commands.Load();

            for (int i = 0; i < Players.Length; i++)
            {
                Players[i] = new CPlayer(i);
            }
            Init = true;
        }