diff --git a/ServCreator/.vs/ServCreator/v16/.suo b/ServCreator/.vs/ServCreator/v16/.suo index 57eb526..5ee706d 100644 Binary files a/ServCreator/.vs/ServCreator/v16/.suo and b/ServCreator/.vs/ServCreator/v16/.suo differ diff --git a/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs b/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs index ebf5a6d..05f77f5 100644 --- a/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs +++ b/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs @@ -41,54 +41,54 @@ namespace ServCreator this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tabControl1 = new System.Windows.Forms.TabControl(); - this.advanced = new System.Windows.Forms.TabPage(); this.simple = new System.Windows.Forms.TabPage(); - this.label2 = new System.Windows.Forms.Label(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); - this.label3 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.label4 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.comboBox2 = new System.Windows.Forms.ComboBox(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.checkBox4 = new System.Windows.Forms.CheckBox(); - this.checkBox5 = new System.Windows.Forms.CheckBox(); - this.checkBox6 = new System.Windows.Forms.CheckBox(); - this.checkBox7 = new System.Windows.Forms.CheckBox(); - this.label6 = new System.Windows.Forms.Label(); - this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); - this.label7 = new System.Windows.Forms.Label(); - this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); - this.label8 = new System.Windows.Forms.Label(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.checkBox8 = new System.Windows.Forms.CheckBox(); - this.checkBox9 = new System.Windows.Forms.CheckBox(); - this.textBox3 = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.numericUpDown5 = new System.Windows.Forms.NumericUpDown(); - this.label11 = new System.Windows.Forms.Label(); - this.checkBox10 = new System.Windows.Forms.CheckBox(); - this.checkBox11 = new System.Windows.Forms.CheckBox(); - this.checkBox12 = new System.Windows.Forms.CheckBox(); - this.checkBox13 = new System.Windows.Forms.CheckBox(); - this.label12 = new System.Windows.Forms.Label(); - this.richTextBox2 = new System.Windows.Forms.RichTextBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.motd = new System.Windows.Forms.RichTextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.onlineMode = new System.Windows.Forms.CheckBox(); + this.generateStructures = new System.Windows.Forms.CheckBox(); + this.whiteList = new System.Windows.Forms.CheckBox(); + this.spawnAnimals = new System.Windows.Forms.CheckBox(); + this.viewDistance = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.levelName = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.allowFlight = new System.Windows.Forms.CheckBox(); + this.spawnNpcs = new System.Windows.Forms.CheckBox(); + this.serverIp = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.serverPort = new System.Windows.Forms.NumericUpDown(); + this.label8 = new System.Windows.Forms.Label(); + this.maxWorldSize = new System.Windows.Forms.NumericUpDown(); + this.label7 = new System.Windows.Forms.Label(); + this.maxPlayers = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.enableCommandBlocks = new System.Windows.Forms.CheckBox(); + this.enableStatus = new System.Windows.Forms.CheckBox(); + this.hardcore = new System.Windows.Forms.CheckBox(); + this.enablePvp = new System.Windows.Forms.CheckBox(); + this.spawnMonsters = new System.Windows.Forms.CheckBox(); + this.difficulty = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.gamemode = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.allowNether = new System.Windows.Forms.CheckBox(); + this.forceGamemode = new System.Windows.Forms.CheckBox(); + this.generatorSettings = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.spawnProtection = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.advanced = new System.Windows.Forms.TabPage(); this.panel3.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); - this.advanced.SuspendLayout(); this.simple.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.viewDistance)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.serverPort)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.maxWorldSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.maxPlayers)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.spawnProtection)).BeginInit(); + this.advanced.SuspendLayout(); this.SuspendLayout(); // // label1 @@ -156,7 +156,7 @@ namespace ServCreator this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.richTextBox1.Location = new System.Drawing.Point(3, 3); this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(676, 350); + this.richTextBox1.Size = new System.Drawing.Size(497, 350); this.richTextBox1.TabIndex = 4; this.richTextBox1.Text = ""; // @@ -184,55 +184,44 @@ namespace ServCreator this.tabControl1.Size = new System.Drawing.Size(511, 382); this.tabControl1.TabIndex = 5; // - // advanced - // - this.advanced.Controls.Add(this.richTextBox1); - this.advanced.Location = new System.Drawing.Point(4, 22); - this.advanced.Name = "advanced"; - this.advanced.Padding = new System.Windows.Forms.Padding(3); - this.advanced.Size = new System.Drawing.Size(682, 356); - this.advanced.TabIndex = 0; - this.advanced.Text = "Full server.properties file"; - this.advanced.UseVisualStyleBackColor = true; - // // simple // this.simple.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); this.simple.Controls.Add(this.linkLabel1); - this.simple.Controls.Add(this.richTextBox2); + this.simple.Controls.Add(this.motd); this.simple.Controls.Add(this.label12); - this.simple.Controls.Add(this.checkBox12); - this.simple.Controls.Add(this.checkBox13); - this.simple.Controls.Add(this.checkBox10); - this.simple.Controls.Add(this.checkBox11); - this.simple.Controls.Add(this.numericUpDown5); + this.simple.Controls.Add(this.onlineMode); + this.simple.Controls.Add(this.generateStructures); + this.simple.Controls.Add(this.whiteList); + this.simple.Controls.Add(this.spawnAnimals); + this.simple.Controls.Add(this.viewDistance); this.simple.Controls.Add(this.label11); - this.simple.Controls.Add(this.textBox3); + this.simple.Controls.Add(this.levelName); this.simple.Controls.Add(this.label10); - this.simple.Controls.Add(this.checkBox8); - this.simple.Controls.Add(this.checkBox9); - this.simple.Controls.Add(this.textBox2); + this.simple.Controls.Add(this.allowFlight); + this.simple.Controls.Add(this.spawnNpcs); + this.simple.Controls.Add(this.serverIp); this.simple.Controls.Add(this.label9); - this.simple.Controls.Add(this.numericUpDown4); + this.simple.Controls.Add(this.serverPort); this.simple.Controls.Add(this.label8); - this.simple.Controls.Add(this.numericUpDown3); + this.simple.Controls.Add(this.maxWorldSize); this.simple.Controls.Add(this.label7); - this.simple.Controls.Add(this.numericUpDown2); + this.simple.Controls.Add(this.maxPlayers); this.simple.Controls.Add(this.label6); - this.simple.Controls.Add(this.checkBox7); - this.simple.Controls.Add(this.checkBox6); - this.simple.Controls.Add(this.checkBox5); - this.simple.Controls.Add(this.checkBox4); - this.simple.Controls.Add(this.checkBox3); - this.simple.Controls.Add(this.comboBox2); + this.simple.Controls.Add(this.enableCommandBlocks); + this.simple.Controls.Add(this.enableStatus); + this.simple.Controls.Add(this.hardcore); + this.simple.Controls.Add(this.enablePvp); + this.simple.Controls.Add(this.spawnMonsters); + this.simple.Controls.Add(this.difficulty); this.simple.Controls.Add(this.label5); - this.simple.Controls.Add(this.comboBox1); + this.simple.Controls.Add(this.gamemode); this.simple.Controls.Add(this.label4); - this.simple.Controls.Add(this.checkBox2); - this.simple.Controls.Add(this.checkBox1); - this.simple.Controls.Add(this.textBox1); + this.simple.Controls.Add(this.allowNether); + this.simple.Controls.Add(this.forceGamemode); + this.simple.Controls.Add(this.generatorSettings); this.simple.Controls.Add(this.label3); - this.simple.Controls.Add(this.numericUpDown1); + this.simple.Controls.Add(this.spawnProtection); this.simple.Controls.Add(this.label2); this.simple.ForeColor = System.Drawing.Color.White; this.simple.Location = new System.Drawing.Point(4, 22); @@ -242,320 +231,96 @@ namespace ServCreator this.simple.TabIndex = 1; this.simple.Text = "Simple configuration"; // - // label2 + // linkLabel1 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(31, 9); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(94, 13); - this.label2.TabIndex = 0; - this.label2.Text = "Spawn Protection:"; + this.linkLabel1.AutoSize = true; + this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.linkLabel1.LinkColor = System.Drawing.Color.White; + this.linkLabel1.Location = new System.Drawing.Point(402, 225); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(88, 13); + this.linkLabel1.TabIndex = 35; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "MOTD Creator"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // - // numericUpDown1 + // motd // - this.numericUpDown1.Location = new System.Drawing.Point(131, 7); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(60, 20); - this.numericUpDown1.TabIndex = 1; - this.numericUpDown1.Value = new decimal(new int[] { - 16, - 0, - 0, - 0}); + this.motd.Location = new System.Drawing.Point(261, 126); + this.motd.Name = "motd"; + this.motd.Size = new System.Drawing.Size(229, 96); + this.motd.TabIndex = 34; + this.motd.Text = "A Minecraft Server"; // - // label3 + // label12 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(27, 36); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(98, 13); - this.label3.TabIndex = 2; - this.label3.Text = "Generator Settings:"; + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(258, 109); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(137, 13); + this.label12.TabIndex = 33; + this.label12.Text = "Message of the Day (motd):"; // - // textBox1 + // onlineMode // - this.textBox1.Location = new System.Drawing.Point(131, 33); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(121, 20); - this.textBox1.TabIndex = 3; + this.onlineMode.AutoSize = true; + this.onlineMode.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.onlineMode.Location = new System.Drawing.Point(401, 82); + this.onlineMode.Name = "onlineMode"; + this.onlineMode.Size = new System.Drawing.Size(89, 17); + this.onlineMode.TabIndex = 32; + this.onlineMode.Text = "Online-Mode:"; + this.onlineMode.UseVisualStyleBackColor = true; // - // checkBox1 + // generateStructures // - this.checkBox1.AutoSize = true; - this.checkBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox1.Location = new System.Drawing.Point(32, 59); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(113, 17); - this.checkBox1.TabIndex = 4; - this.checkBox1.Text = "Force Gamemode:"; - this.checkBox1.UseVisualStyleBackColor = true; + this.generateStructures.AutoSize = true; + this.generateStructures.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.generateStructures.Checked = true; + this.generateStructures.CheckState = System.Windows.Forms.CheckState.Checked; + this.generateStructures.Location = new System.Drawing.Point(258, 81); + this.generateStructures.Name = "generateStructures"; + this.generateStructures.Size = new System.Drawing.Size(124, 17); + this.generateStructures.TabIndex = 31; + this.generateStructures.Text = "Generate Structures:"; + this.generateStructures.UseVisualStyleBackColor = true; // - // checkBox2 + // whiteList // - this.checkBox2.AutoSize = true; - this.checkBox2.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox2.Checked = true; - this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox2.Location = new System.Drawing.Point(163, 59); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(89, 17); - this.checkBox2.TabIndex = 5; - this.checkBox2.Text = "Allow Nether:"; - this.checkBox2.UseVisualStyleBackColor = true; + this.whiteList.AutoSize = true; + this.whiteList.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.whiteList.Location = new System.Drawing.Point(418, 59); + this.whiteList.Name = "whiteList"; + this.whiteList.Size = new System.Drawing.Size(72, 17); + this.whiteList.TabIndex = 30; + this.whiteList.Text = "White-list:"; + this.whiteList.UseVisualStyleBackColor = true; // - // label4 + // spawnAnimals // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(61, 85); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(64, 13); - this.label4.TabIndex = 6; - this.label4.Text = "Gamemode:"; + this.spawnAnimals.AutoSize = true; + this.spawnAnimals.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.spawnAnimals.Checked = true; + this.spawnAnimals.CheckState = System.Windows.Forms.CheckState.Checked; + this.spawnAnimals.Location = new System.Drawing.Point(281, 59); + this.spawnAnimals.Name = "spawnAnimals"; + this.spawnAnimals.Size = new System.Drawing.Size(101, 17); + this.spawnAnimals.TabIndex = 29; + this.spawnAnimals.Text = "Spawn Animals:"; + this.spawnAnimals.UseVisualStyleBackColor = true; // - // comboBox1 + // viewDistance // - this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "survival", - "adventure", - "creative"}); - this.comboBox1.Location = new System.Drawing.Point(131, 82); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(121, 21); - this.comboBox1.TabIndex = 1; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(75, 112); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(50, 13); - this.label5.TabIndex = 8; - this.label5.Text = "Difficulty:"; - // - // comboBox2 - // - this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox2.FormattingEnabled = true; - this.comboBox2.Items.AddRange(new object[] { - "peaceful", - "easy", - "normal", - "hard"}); - this.comboBox2.Location = new System.Drawing.Point(131, 109); - this.comboBox2.Name = "comboBox2"; - this.comboBox2.Size = new System.Drawing.Size(121, 21); - this.comboBox2.TabIndex = 9; - // - // checkBox3 - // - this.checkBox3.AutoSize = true; - this.checkBox3.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox3.Checked = true; - this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox3.Location = new System.Drawing.Point(37, 136); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(108, 17); - this.checkBox3.TabIndex = 10; - this.checkBox3.Text = "Spawn Monsters:"; - this.checkBox3.UseVisualStyleBackColor = true; - // - // checkBox4 - // - this.checkBox4.AutoSize = true; - this.checkBox4.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox4.Checked = true; - this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox4.Location = new System.Drawing.Point(167, 136); - this.checkBox4.Name = "checkBox4"; - this.checkBox4.Size = new System.Drawing.Size(85, 17); - this.checkBox4.TabIndex = 11; - this.checkBox4.Text = "Enable PvP:"; - this.checkBox4.UseVisualStyleBackColor = true; - // - // checkBox5 - // - this.checkBox5.AutoSize = true; - this.checkBox5.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox5.Location = new System.Drawing.Point(72, 159); - this.checkBox5.Name = "checkBox5"; - this.checkBox5.Size = new System.Drawing.Size(73, 17); - this.checkBox5.TabIndex = 12; - this.checkBox5.Text = "Hardcore:"; - this.checkBox5.UseVisualStyleBackColor = true; - // - // checkBox6 - // - this.checkBox6.AutoSize = true; - this.checkBox6.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox6.Checked = true; - this.checkBox6.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox6.Location = new System.Drawing.Point(159, 159); - this.checkBox6.Name = "checkBox6"; - this.checkBox6.Size = new System.Drawing.Size(93, 17); - this.checkBox6.TabIndex = 13; - this.checkBox6.Text = "Enable status:"; - this.checkBox6.UseVisualStyleBackColor = true; - // - // checkBox7 - // - this.checkBox7.AutoSize = true; - this.checkBox7.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox7.Location = new System.Drawing.Point(105, 182); - this.checkBox7.Name = "checkBox7"; - this.checkBox7.Size = new System.Drawing.Size(147, 17); - this.checkBox7.TabIndex = 14; - this.checkBox7.Text = "Enable Command Blocks:"; - this.checkBox7.UseVisualStyleBackColor = true; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(58, 207); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(67, 13); - this.label6.TabIndex = 15; - this.label6.Text = "Max Players:"; - // - // numericUpDown2 - // - this.numericUpDown2.Location = new System.Drawing.Point(131, 205); - this.numericUpDown2.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.numericUpDown2.Name = "numericUpDown2"; - this.numericUpDown2.Size = new System.Drawing.Size(60, 20); - this.numericUpDown2.TabIndex = 16; - this.numericUpDown2.Value = new decimal(new int[] { - 20, - 0, - 0, - 0}); - // - // numericUpDown3 - // - this.numericUpDown3.Location = new System.Drawing.Point(131, 231); - this.numericUpDown3.Maximum = new decimal(new int[] { - 1410065408, - 2, - 0, - 0}); - this.numericUpDown3.Name = "numericUpDown3"; - this.numericUpDown3.Size = new System.Drawing.Size(121, 20); - this.numericUpDown3.TabIndex = 18; - this.numericUpDown3.Value = new decimal(new int[] { - 29999984, - 0, - 0, - 0}); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(41, 233); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(84, 13); - this.label7.TabIndex = 17; - this.label7.Text = "Max World Size:"; - // - // numericUpDown4 - // - this.numericUpDown4.Location = new System.Drawing.Point(131, 257); - this.numericUpDown4.Maximum = new decimal(new int[] { - 69420, - 0, - 0, - 0}); - this.numericUpDown4.Name = "numericUpDown4"; - this.numericUpDown4.Size = new System.Drawing.Size(60, 20); - this.numericUpDown4.TabIndex = 20; - this.numericUpDown4.Value = new decimal(new int[] { - 25565, - 0, - 0, - 0}); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(62, 259); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(63, 13); - this.label8.TabIndex = 19; - this.label8.Text = "Server Port:"; - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(131, 283); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(121, 20); - this.textBox2.TabIndex = 22; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(69, 286); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(54, 13); - this.label9.TabIndex = 21; - this.label9.Text = "Server IP:"; - // - // checkBox8 - // - this.checkBox8.AutoSize = true; - this.checkBox8.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox8.Location = new System.Drawing.Point(170, 309); - this.checkBox8.Name = "checkBox8"; - this.checkBox8.Size = new System.Drawing.Size(82, 17); - this.checkBox8.TabIndex = 24; - this.checkBox8.Text = "Allow Flight:"; - this.checkBox8.UseVisualStyleBackColor = true; - // - // checkBox9 - // - this.checkBox9.AutoSize = true; - this.checkBox9.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox9.Checked = true; - this.checkBox9.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox9.Location = new System.Drawing.Point(53, 309); - this.checkBox9.Name = "checkBox9"; - this.checkBox9.Size = new System.Drawing.Size(92, 17); - this.checkBox9.TabIndex = 23; - this.checkBox9.Text = "Spawn NPCs:"; - this.checkBox9.UseVisualStyleBackColor = true; - // - // textBox3 - // - this.textBox3.Location = new System.Drawing.Point(369, 6); - this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(121, 20); - this.textBox3.TabIndex = 26; - this.textBox3.Text = "world"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(296, 9); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(67, 13); - this.label10.TabIndex = 25; - this.label10.Text = "Level Name:"; - // - // numericUpDown5 - // - this.numericUpDown5.Location = new System.Drawing.Point(369, 33); - this.numericUpDown5.Maximum = new decimal(new int[] { + this.viewDistance.Location = new System.Drawing.Point(369, 33); + this.viewDistance.Maximum = new decimal(new int[] { 64, 0, 0, 0}); - this.numericUpDown5.Name = "numericUpDown5"; - this.numericUpDown5.Size = new System.Drawing.Size(60, 20); - this.numericUpDown5.TabIndex = 28; - this.numericUpDown5.Value = new decimal(new int[] { + this.viewDistance.Name = "viewDistance"; + this.viewDistance.Size = new System.Drawing.Size(60, 20); + this.viewDistance.TabIndex = 28; + this.viewDistance.Value = new decimal(new int[] { 10, 0, 0, @@ -570,83 +335,319 @@ namespace ServCreator this.label11.TabIndex = 27; this.label11.Text = "View distance:"; // - // checkBox10 + // levelName // - this.checkBox10.AutoSize = true; - this.checkBox10.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox10.Location = new System.Drawing.Point(418, 59); - this.checkBox10.Name = "checkBox10"; - this.checkBox10.Size = new System.Drawing.Size(72, 17); - this.checkBox10.TabIndex = 30; - this.checkBox10.Text = "White-list:"; - this.checkBox10.UseVisualStyleBackColor = true; + this.levelName.Location = new System.Drawing.Point(369, 6); + this.levelName.Name = "levelName"; + this.levelName.Size = new System.Drawing.Size(121, 20); + this.levelName.TabIndex = 26; + this.levelName.Text = "world"; // - // checkBox11 + // label10 // - this.checkBox11.AutoSize = true; - this.checkBox11.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox11.Checked = true; - this.checkBox11.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox11.Location = new System.Drawing.Point(281, 59); - this.checkBox11.Name = "checkBox11"; - this.checkBox11.Size = new System.Drawing.Size(101, 17); - this.checkBox11.TabIndex = 29; - this.checkBox11.Text = "Spawn Animals:"; - this.checkBox11.UseVisualStyleBackColor = true; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(296, 9); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(67, 13); + this.label10.TabIndex = 25; + this.label10.Text = "Level Name:"; // - // checkBox12 + // allowFlight // - this.checkBox12.AutoSize = true; - this.checkBox12.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox12.Location = new System.Drawing.Point(401, 82); - this.checkBox12.Name = "checkBox12"; - this.checkBox12.Size = new System.Drawing.Size(89, 17); - this.checkBox12.TabIndex = 32; - this.checkBox12.Text = "Online-Mode:"; - this.checkBox12.UseVisualStyleBackColor = true; + this.allowFlight.AutoSize = true; + this.allowFlight.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.allowFlight.Location = new System.Drawing.Point(170, 309); + this.allowFlight.Name = "allowFlight"; + this.allowFlight.Size = new System.Drawing.Size(82, 17); + this.allowFlight.TabIndex = 24; + this.allowFlight.Text = "Allow Flight:"; + this.allowFlight.UseVisualStyleBackColor = true; // - // checkBox13 + // spawnNpcs // - this.checkBox13.AutoSize = true; - this.checkBox13.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.checkBox13.Checked = true; - this.checkBox13.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox13.Location = new System.Drawing.Point(258, 81); - this.checkBox13.Name = "checkBox13"; - this.checkBox13.Size = new System.Drawing.Size(124, 17); - this.checkBox13.TabIndex = 31; - this.checkBox13.Text = "Generate Structures:"; - this.checkBox13.UseVisualStyleBackColor = true; + this.spawnNpcs.AutoSize = true; + this.spawnNpcs.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.spawnNpcs.Checked = true; + this.spawnNpcs.CheckState = System.Windows.Forms.CheckState.Checked; + this.spawnNpcs.Location = new System.Drawing.Point(53, 309); + this.spawnNpcs.Name = "spawnNpcs"; + this.spawnNpcs.Size = new System.Drawing.Size(92, 17); + this.spawnNpcs.TabIndex = 23; + this.spawnNpcs.Text = "Spawn NPCs:"; + this.spawnNpcs.UseVisualStyleBackColor = true; // - // label12 + // serverIp // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(258, 109); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(137, 13); - this.label12.TabIndex = 33; - this.label12.Text = "Message of the Day (motd):"; + this.serverIp.Location = new System.Drawing.Point(131, 283); + this.serverIp.MaxLength = 15; + this.serverIp.Name = "serverIp"; + this.serverIp.Size = new System.Drawing.Size(121, 20); + this.serverIp.TabIndex = 22; // - // richTextBox2 + // label9 // - this.richTextBox2.Location = new System.Drawing.Point(261, 126); - this.richTextBox2.Name = "richTextBox2"; - this.richTextBox2.Size = new System.Drawing.Size(229, 96); - this.richTextBox2.TabIndex = 34; - this.richTextBox2.Text = "A Minecraft Server"; + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(69, 286); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(54, 13); + this.label9.TabIndex = 21; + this.label9.Text = "Server IP:"; // - // linkLabel1 + // serverPort // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.linkLabel1.LinkColor = System.Drawing.Color.White; - this.linkLabel1.Location = new System.Drawing.Point(402, 225); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(88, 13); - this.linkLabel1.TabIndex = 35; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "MOTD Creator"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + this.serverPort.Location = new System.Drawing.Point(131, 257); + this.serverPort.Maximum = new decimal(new int[] { + 69420, + 0, + 0, + 0}); + this.serverPort.Name = "serverPort"; + this.serverPort.Size = new System.Drawing.Size(60, 20); + this.serverPort.TabIndex = 20; + this.serverPort.Value = new decimal(new int[] { + 25565, + 0, + 0, + 0}); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(62, 259); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(63, 13); + this.label8.TabIndex = 19; + this.label8.Text = "Server Port:"; + // + // maxWorldSize + // + this.maxWorldSize.Location = new System.Drawing.Point(131, 231); + this.maxWorldSize.Maximum = new decimal(new int[] { + 1410065408, + 2, + 0, + 0}); + this.maxWorldSize.Name = "maxWorldSize"; + this.maxWorldSize.Size = new System.Drawing.Size(121, 20); + this.maxWorldSize.TabIndex = 18; + this.maxWorldSize.Value = new decimal(new int[] { + 29999984, + 0, + 0, + 0}); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(41, 233); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(84, 13); + this.label7.TabIndex = 17; + this.label7.Text = "Max World Size:"; + // + // maxPlayers + // + this.maxPlayers.Location = new System.Drawing.Point(131, 205); + this.maxPlayers.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.maxPlayers.Name = "maxPlayers"; + this.maxPlayers.Size = new System.Drawing.Size(60, 20); + this.maxPlayers.TabIndex = 16; + this.maxPlayers.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(58, 207); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(67, 13); + this.label6.TabIndex = 15; + this.label6.Text = "Max Players:"; + // + // enableCommandBlocks + // + this.enableCommandBlocks.AutoSize = true; + this.enableCommandBlocks.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.enableCommandBlocks.Location = new System.Drawing.Point(105, 182); + this.enableCommandBlocks.Name = "enableCommandBlocks"; + this.enableCommandBlocks.Size = new System.Drawing.Size(147, 17); + this.enableCommandBlocks.TabIndex = 14; + this.enableCommandBlocks.Text = "Enable Command Blocks:"; + this.enableCommandBlocks.UseVisualStyleBackColor = true; + // + // enableStatus + // + this.enableStatus.AutoSize = true; + this.enableStatus.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.enableStatus.Checked = true; + this.enableStatus.CheckState = System.Windows.Forms.CheckState.Checked; + this.enableStatus.Location = new System.Drawing.Point(159, 159); + this.enableStatus.Name = "enableStatus"; + this.enableStatus.Size = new System.Drawing.Size(93, 17); + this.enableStatus.TabIndex = 13; + this.enableStatus.Text = "Enable status:"; + this.enableStatus.UseVisualStyleBackColor = true; + // + // hardcore + // + this.hardcore.AutoSize = true; + this.hardcore.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.hardcore.Location = new System.Drawing.Point(72, 159); + this.hardcore.Name = "hardcore"; + this.hardcore.Size = new System.Drawing.Size(73, 17); + this.hardcore.TabIndex = 12; + this.hardcore.Text = "Hardcore:"; + this.hardcore.UseVisualStyleBackColor = true; + // + // enablePvp + // + this.enablePvp.AutoSize = true; + this.enablePvp.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.enablePvp.Checked = true; + this.enablePvp.CheckState = System.Windows.Forms.CheckState.Checked; + this.enablePvp.Location = new System.Drawing.Point(167, 136); + this.enablePvp.Name = "enablePvp"; + this.enablePvp.Size = new System.Drawing.Size(85, 17); + this.enablePvp.TabIndex = 11; + this.enablePvp.Text = "Enable PvP:"; + this.enablePvp.UseVisualStyleBackColor = true; + // + // spawnMonsters + // + this.spawnMonsters.AutoSize = true; + this.spawnMonsters.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.spawnMonsters.Checked = true; + this.spawnMonsters.CheckState = System.Windows.Forms.CheckState.Checked; + this.spawnMonsters.Location = new System.Drawing.Point(37, 136); + this.spawnMonsters.Name = "spawnMonsters"; + this.spawnMonsters.Size = new System.Drawing.Size(108, 17); + this.spawnMonsters.TabIndex = 10; + this.spawnMonsters.Text = "Spawn Monsters:"; + this.spawnMonsters.UseVisualStyleBackColor = true; + // + // difficulty + // + this.difficulty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.difficulty.FormattingEnabled = true; + this.difficulty.Items.AddRange(new object[] { + "peaceful", + "easy", + "normal", + "hard"}); + this.difficulty.Location = new System.Drawing.Point(131, 109); + this.difficulty.Name = "difficulty"; + this.difficulty.Size = new System.Drawing.Size(121, 21); + this.difficulty.TabIndex = 9; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(75, 112); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(50, 13); + this.label5.TabIndex = 8; + this.label5.Text = "Difficulty:"; + // + // gamemode + // + this.gamemode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.gamemode.FormattingEnabled = true; + this.gamemode.Items.AddRange(new object[] { + "survival", + "adventure", + "creative"}); + this.gamemode.Location = new System.Drawing.Point(131, 82); + this.gamemode.Name = "gamemode"; + this.gamemode.Size = new System.Drawing.Size(121, 21); + this.gamemode.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(61, 85); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(64, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Gamemode:"; + // + // allowNether + // + this.allowNether.AutoSize = true; + this.allowNether.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.allowNether.Checked = true; + this.allowNether.CheckState = System.Windows.Forms.CheckState.Checked; + this.allowNether.Location = new System.Drawing.Point(163, 59); + this.allowNether.Name = "allowNether"; + this.allowNether.Size = new System.Drawing.Size(89, 17); + this.allowNether.TabIndex = 5; + this.allowNether.Text = "Allow Nether:"; + this.allowNether.UseVisualStyleBackColor = true; + // + // forceGamemode + // + this.forceGamemode.AutoSize = true; + this.forceGamemode.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.forceGamemode.Location = new System.Drawing.Point(32, 59); + this.forceGamemode.Name = "forceGamemode"; + this.forceGamemode.Size = new System.Drawing.Size(113, 17); + this.forceGamemode.TabIndex = 4; + this.forceGamemode.Text = "Force Gamemode:"; + this.forceGamemode.UseVisualStyleBackColor = true; + // + // generatorSettings + // + this.generatorSettings.Location = new System.Drawing.Point(131, 33); + this.generatorSettings.Name = "generatorSettings"; + this.generatorSettings.Size = new System.Drawing.Size(121, 20); + this.generatorSettings.TabIndex = 3; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(27, 36); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(98, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Generator Settings:"; + // + // spawnProtection + // + this.spawnProtection.Location = new System.Drawing.Point(131, 7); + this.spawnProtection.Name = "spawnProtection"; + this.spawnProtection.Size = new System.Drawing.Size(60, 20); + this.spawnProtection.TabIndex = 1; + this.spawnProtection.Value = new decimal(new int[] { + 16, + 0, + 0, + 0}); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(31, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(94, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Spawn Protection:"; + // + // advanced + // + this.advanced.Controls.Add(this.richTextBox1); + this.advanced.Location = new System.Drawing.Point(4, 22); + this.advanced.Name = "advanced"; + this.advanced.Padding = new System.Windows.Forms.Padding(3); + this.advanced.Size = new System.Drawing.Size(503, 356); + this.advanced.TabIndex = 0; + this.advanced.Text = "Full server.properties file"; + this.advanced.UseVisualStyleBackColor = true; // // PropertiesEditorForm // @@ -666,14 +667,14 @@ namespace ServCreator this.panel3.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); - this.advanced.ResumeLayout(false); this.simple.ResumeLayout(false); this.simple.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.viewDistance)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.serverPort)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.maxWorldSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.maxPlayers)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.spawnProtection)).EndInit(); + this.advanced.ResumeLayout(false); this.ResumeLayout(false); } @@ -692,41 +693,41 @@ namespace ServCreator private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage simple; private System.Windows.Forms.TabPage advanced; - private System.Windows.Forms.CheckBox checkBox6; - private System.Windows.Forms.CheckBox checkBox5; - private System.Windows.Forms.CheckBox checkBox4; - private System.Windows.Forms.CheckBox checkBox3; - private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.CheckBox enableStatus; + private System.Windows.Forms.CheckBox hardcore; + private System.Windows.Forms.CheckBox enablePvp; + private System.Windows.Forms.CheckBox spawnMonsters; + private System.Windows.Forms.ComboBox difficulty; private System.Windows.Forms.Label label5; - private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox gamemode; private System.Windows.Forms.Label label4; - private System.Windows.Forms.CheckBox checkBox2; - private System.Windows.Forms.CheckBox checkBox1; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.CheckBox allowNether; + private System.Windows.Forms.CheckBox forceGamemode; + private System.Windows.Forms.TextBox generatorSettings; private System.Windows.Forms.Label label3; - private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.NumericUpDown spawnProtection; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label6; - private System.Windows.Forms.CheckBox checkBox7; + private System.Windows.Forms.CheckBox enableCommandBlocks; private System.Windows.Forms.LinkLabel linkLabel1; - private System.Windows.Forms.RichTextBox richTextBox2; + private System.Windows.Forms.RichTextBox motd; private System.Windows.Forms.Label label12; - private System.Windows.Forms.CheckBox checkBox12; - private System.Windows.Forms.CheckBox checkBox13; - private System.Windows.Forms.CheckBox checkBox10; - private System.Windows.Forms.CheckBox checkBox11; - private System.Windows.Forms.NumericUpDown numericUpDown5; + private System.Windows.Forms.CheckBox onlineMode; + private System.Windows.Forms.CheckBox generateStructures; + private System.Windows.Forms.CheckBox whiteList; + private System.Windows.Forms.CheckBox spawnAnimals; + private System.Windows.Forms.NumericUpDown viewDistance; private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox levelName; private System.Windows.Forms.Label label10; - private System.Windows.Forms.CheckBox checkBox8; - private System.Windows.Forms.CheckBox checkBox9; - private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.CheckBox allowFlight; + private System.Windows.Forms.CheckBox spawnNpcs; + private System.Windows.Forms.TextBox serverIp; private System.Windows.Forms.Label label9; - private System.Windows.Forms.NumericUpDown numericUpDown4; + private System.Windows.Forms.NumericUpDown serverPort; private System.Windows.Forms.Label label8; - private System.Windows.Forms.NumericUpDown numericUpDown3; + private System.Windows.Forms.NumericUpDown maxWorldSize; private System.Windows.Forms.Label label7; - private System.Windows.Forms.NumericUpDown numericUpDown2; + private System.Windows.Forms.NumericUpDown maxPlayers; } } \ No newline at end of file diff --git a/ServCreator/ServCreator/PropertiesEditorForm.cs b/ServCreator/ServCreator/PropertiesEditorForm.cs index 1835532..b5db118 100644 --- a/ServCreator/ServCreator/PropertiesEditorForm.cs +++ b/ServCreator/ServCreator/PropertiesEditorForm.cs @@ -1,20 +1,16 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Diagnostics; using System.Windows.Forms; using System.IO; +using Newtonsoft.Json; namespace ServCreator { public partial class PropertiesEditorForm : Form { - string pathToEdit; + public string pathToEdit; + StreamWriter writer; public PropertiesEditorForm(string path, string name) { InitializeComponent(); @@ -27,16 +23,59 @@ namespace ServCreator StreamReader streamReader = new StreamReader(pathToEdit); richTextBox1.Text = streamReader.ReadToEnd(); streamReader.Close(); + } void saveIt() { - StreamWriter streamWriter = new StreamWriter(pathToEdit); - streamWriter.Write(richTextBox1.Text); - streamWriter.Close(); + writer = new StreamWriter(pathToEdit); + writer.Write(richTextBox1.Text); + writer.Close(); } - private void button1_Click(object sender, EventArgs e) { saveIt(); } + void simpleSave() + { + var nowalinia = Environment.NewLine; + + writer = new StreamWriter(pathToEdit); + writer.Write("#Minecraft server properties" + nowalinia + + "#" + DateTime.Now + nowalinia + + "spawn-protection=" + spawnProtection.Value + nowalinia + + "generator-settings=" + generatorSettings.Text + nowalinia + + "force-gamemode=" + forceGamemode.Checked.ToString().ToLower() + nowalinia + + "allow-nether=" + allowNether.Checked.ToString().ToLower() + nowalinia + + "gamemode=" + gamemode.Text + nowalinia + + "difficulty=" + difficulty.Text + nowalinia + + "spawn-monstars=" + spawnMonsters.Checked.ToString().ToLower() + nowalinia + + "pvp=" + enablePvp.Checked.ToString().ToLower() + nowalinia + + "level-type=default" + nowalinia + + "hardcore=" + hardcore.Checked.ToString().ToLower() + nowalinia + + "enable-status=" + enableStatus.Checked.ToString().ToLower() + nowalinia + + "enable-command-block=" + enableCommandBlocks.Checked.ToString().ToLower() + nowalinia + + "max-players=" + maxPlayers.Value + nowalinia + + "max-world-size=" + maxWorldSize.Value + nowalinia + + "server-port=" + serverPort.Value + nowalinia + + "server-ip=" + serverIp.Text + nowalinia + + "spawn-npcs=" + spawnNpcs.Checked.ToString().ToLower() + nowalinia + + "allow-flight=" + allowFlight.Checked.ToString().ToLower() + nowalinia + + "level-name=" + levelName.Text + nowalinia + + "view-distance=" + viewDistance.Value + nowalinia + + "spawn-animals=" + spawnAnimals.Checked.ToString().ToLower() + nowalinia + + "white-list=" + whiteList.Checked.ToString().ToLower() + nowalinia + + "generate-structures=" + generateStructures.Checked.ToString().ToLower() + nowalinia + + "online-mode=" + onlineMode.Checked.ToString().ToLower() + nowalinia + + "motd=" + motd.Text + nowalinia + ); + writer.Close(); + MessageBox.Show("ja pier...") + } + + private void button1_Click(object sender, EventArgs e) { + if (tabControl1.SelectedIndex == 1) + saveIt(); + else + MessageBox.Show("Idź do manualnego, lol"); + } private void button2_Click(object sender, EventArgs e) { saveIt(); this.Close(); } private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) @@ -44,4 +83,4 @@ namespace ServCreator Process.Start("https://minecraft.tools/en/motd.php"); } } -} +} \ No newline at end of file diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.exe b/ServCreator/ServCreator/bin/Debug/ServCreator.exe index b151fe3..11a860c 100644 Binary files a/ServCreator/ServCreator/bin/Debug/ServCreator.exe and b/ServCreator/ServCreator/bin/Debug/ServCreator.exe differ diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.pdb b/ServCreator/ServCreator/bin/Debug/ServCreator.pdb index cce4c63..e206185 100644 Binary files a/ServCreator/ServCreator/bin/Debug/ServCreator.pdb and b/ServCreator/ServCreator/bin/Debug/ServCreator.pdb differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache index d7550e2..e72d2af 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache and b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache b/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache index 7b1eafb..f8b93f2 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache and b/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.exe b/ServCreator/ServCreator/obj/Debug/ServCreator.exe index b151fe3..11a860c 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.exe and b/ServCreator/ServCreator/obj/Debug/ServCreator.exe differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.pdb b/ServCreator/ServCreator/obj/Debug/ServCreator.pdb index cce4c63..e206185 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.pdb and b/ServCreator/ServCreator/obj/Debug/ServCreator.pdb differ