Skip to content
This repository has been archived by the owner on Aug 21, 2022. It is now read-only.

Commit

Permalink
Sync spawn-animals and fix spawn-animal setting drop-down box
Browse files Browse the repository at this point in the history
  • Loading branch information
Soniczac7 committed Apr 19, 2022
1 parent 1fc8afa commit ef091f2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
5 changes: 2 additions & 3 deletions MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,34 @@ public MainForm()
Debug.WriteLine("Failed to find resource-pack");
console.AppendText("\n[Error] Failed to find resource-pack in server.properties");
}
// Process spawn-animals
string spawnanimalsSetting = serverProperties[31];
if (spawnanimalsSetting.Contains("spawn-animals"))
{
Debug.WriteLine("Found spawn-animals");
string spawnanimals;
spawnanimals = spawnanimalsSetting.Remove(0, 14);
Debug.WriteLine("spawn-animals value is " + spawnanimals);
if (spawnanimals == "true")
{
comboBox19.SelectedIndex = 0;
}
else if (spawnanimals == "false")
{
comboBox19.SelectedIndex = 1;
}
else
{
// spawn-animals is invalid
console.AppendText("\n[Error] spawn-animals in server.properties contains an invalid value");
}
}
else
{
// spawn-animals line did not contain "spawn-animals"
Debug.WriteLine("Failed to find spawn-animals");
console.AppendText("\n[Error] Failed to find spawn-animals in server.properties");
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit ef091f2

Please sign in to comment.