public EssentialServer(MiNetServer server)
        {
            _server = server;
            if (EssentialPlayerFactory.instance is EssentialPlayerFactory)
            {
                factory = EssentialPlayerFactory.instance;
            }
            else
            {
                factory = new EssentialPlayerFactory();
            }

            /*var builder = new ConfigurationBuilder()
             *      .SetBasePath(AppContext.BaseDirectory)
             *      .AddJsonFile(path: "config.json");
             * this.config = builder.Build();*/

            //OpList
            string opsFilePath = Directory.GetCurrentDirectory() + "/ops.txt";
            String fileContent = string.Empty;

            if (File.Exists(opsFilePath))
            {
                fileContent = File.ReadAllText(opsFilePath);
                foreach (string rawLine in fileContent.Split(new[] { "\r\n", "\n", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
                {
                    string line = rawLine.Trim();
                    if (line.StartsWith("#"))
                    {
                        continue;                                           //It's a comment or not a key value pair.
                    }
                    OpsList.Add(line.ToLower());
                }
            }
            else
            {
                Log.Warn("Didn't found ops.txt in " + Directory.GetCurrentDirectory() + "creating ops.txt");
                var file = File.Create(opsFilePath);
            }
        }
 public EssentialPlayerFactory()
 {
     instance = this;
 }