diff --git a/Commands/other/CmdRide.cs b/Commands/other/CmdRide.cs index f9ec6efd1..a9f887371 100644 --- a/Commands/other/CmdRide.cs +++ b/Commands/other/CmdRide.cs @@ -81,7 +81,7 @@ namespace MCGalaxy.Commands { ; } - p.trainGrab = false; + p.trainGrab = false; Player.Message(p, "Dismounted"); Thread.Sleep(1000); p.trainInvincible = false; diff --git a/GUI/PropertyWindow.Games.cs b/GUI/PropertyWindow.Games.cs index 3b1d1f375..45cf42f87 100644 --- a/GUI/PropertyWindow.Games.cs +++ b/GUI/PropertyWindow.Games.cs @@ -156,14 +156,19 @@ namespace MCGalaxy.Gui { private void lsMapUse_SelectedIndexChanged(object sender, EventArgs e) { SaveLavaMapSettings(); + if (lsMapUse.SelectedIndex == -1) { + groupBox22.Text = "Map settings"; + pg_lavaMap.SelectedObject = null; + return; + } + string name = lsMapUse.Items[lsMapUse.SelectedIndex].ToString(); - lsLoadedMap = name; groupBox22.Text = "Map settings (" + name + ")"; try { LavaSurvival.MapSettings m = Server.lava.LoadMapSettings(name); pg_lavaMap.SelectedObject = new LavaMapProperties(m); - } catch ( Exception ex ) { + } catch (Exception ex) { Server.ErrorLog(ex); pg_lavaMap.SelectedObject = null; } @@ -171,8 +176,8 @@ namespace MCGalaxy.Gui { void SaveLavaMapSettings() { if (pg_lavaMap.SelectedObject == null) return; - LavaMapProperties props = (LavaMapProperties)pg_lavaMap.SelectedObject; - Server.lava.SaveMapSettings(props.m); + LavaMapProperties props = (LavaMapProperties)pg_lavaMap.SelectedObject; + Server.lava.SaveMapSettings(props.m); } private void lsBtnEndVote_Click(object sender, EventArgs e) { diff --git a/GUI/PropertyWindow.cs b/GUI/PropertyWindow.cs index f9af68cfc..58c47049e 100644 --- a/GUI/PropertyWindow.cs +++ b/GUI/PropertyWindow.cs @@ -27,7 +27,6 @@ using MCGalaxy.Util; namespace MCGalaxy.Gui { public partial class PropertyWindow : Form { - string lsLoadedMap = ""; ZombieProperties zsSettings = new ZombieProperties(); LavaProperties lsSettings = new LavaProperties();