Exemplo n.º 1
0
        /// <summary>
        /// Generates a set of default settings.
        /// </summary>
        private void GenerateDefaultSetup()
        {
            serverProperties.Clear();
            serverProperties.VirtualGrouping = true;

            serverProperties.ClearComments();
            serverProperties.AddComment("#Minecraft server properties");
            serverProperties.AddComment("#(File Modification Datestamp)");

            // Server group
            serverProperties.SetValue("server-ip", "");
            serverProperties.SetValue("server-port", "25565");
            serverProperties.SetValue("online-mode", "true");

            // World generation group
            serverProperties.SetValue("level-name", "world");
            serverProperties.SetValue("level-type", "DEFAULT");
            serverProperties.SetValue("generator-settings", "");
            serverProperties.SetValue("level-seed", "");
            serverProperties.SetValue("allow-nether", "true");
            serverProperties.SetValue("spawn-protection", "16");

            // World options group
            serverProperties.SetValue("generate-structures", "true");
            serverProperties.SetValue("spawn-npcs", "true");
            serverProperties.SetValue("spawn-animals", "true");
            serverProperties.SetValue("spawn-monsters", "true");
            serverProperties.SetValue("enable-command-block", "false");

            // Player options group
            serverProperties.SetValue("gamemode", "0");
            serverProperties.SetValue("difficulty", "1");
            serverProperties.SetValue("hardcore", "false");
            serverProperties.SetValue("pvp", "true");
            serverProperties.SetValue("max-players", "20");
            serverProperties.SetValue("view-distance", "10");
            serverProperties.SetValue("white-list", "false");

            // Message of the day
            serverProperties.SetValue("motd", "A Minecraft server");
        }