diff --git a/Commands/World/CmdGoto.cs b/Commands/World/CmdGoto.cs index 6a8ff77aa..2ae91fe39 100644 --- a/Commands/World/CmdGoto.cs +++ b/Commands/World/CmdGoto.cs @@ -116,8 +116,7 @@ namespace MCGalaxy.Commands.World { CheckGamesJoin(p, oldLevel); p.prevMsg = ""; - bool showJoin = p.level.ShouldSaveChanges() || (oldLevel != null && oldLevel.ShouldSaveChanges()); - if (!p.hidden && showJoin) { + if (!p.hidden && p.level.ShouldShowJoinMessage(oldLevel)) { Player.SendChatFrom(p, p.color + "*" + p.DisplayName + " %Swent to &b" + lvl.name, false); Player.RaisePlayerAction(p, PlayerAction.JoinWorld, lvl.name); } diff --git a/Levels/Level.cs b/Levels/Level.cs index 4c383eae9..461c2b2c1 100644 --- a/Levels/Level.cs +++ b/Levels/Level.cs @@ -127,6 +127,13 @@ namespace MCGalaxy { return true; } + public bool ShouldShowJoinMessage(Level prev) { + if (Server.zombie.Running && name.CaselessEq(Server.zombie.CurLevelName) + && (prev == this || prev.name.CaselessEq(Server.zombie.LastLevelName))) return false; + if (Server.lava.active && Server.lava.HasMap(name)) return false; + return true; + } + /// The currently active game running on this map, /// or null if there is no game running. public IGame CurrentGame() {