Fix words sometimes being combined for multi-line messages.

This commit is contained in:
UnknownShadow200 2016-02-28 10:58:36 +11:00
parent 995f6472dc
commit 0543cb1dd3
3 changed files with 11 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy) Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy)
Dual-licensed under the Educational Community License, Version 2.0 and Dual-licensed under the Educational Community License, Version 2.0 and
the GNU General Public License, Version 3 (the "Licenses"); you may the GNU General Public License, Version 3 (the "Licenses"); you may
not use this file except in compliance with the Licenses. You may not use this file except in compliance with the Licenses. You may
obtain a copy of the Licenses at obtain a copy of the Licenses at

View File

@ -110,6 +110,10 @@ namespace MCGalaxy
[Obsolete] public ushort depth; [Obsolete] public ushort depth;
[Obsolete] public ushort length; [Obsolete] public ushort length;
public bool IsMuseum {
get { return name.StartsWith("&cMuseum " + Server.DefaultColor, StringComparison.Ordinal); }
}
public int drown = 70; public int drown = 70;
public bool edgeWater; public bool edgeWater;
public int fall = 9; public int fall = 9;
@ -275,7 +279,7 @@ namespace MCGalaxy
public bool Unload(bool silent = false, bool save = true) public bool Unload(bool silent = false, bool save = true)
{ {
if (Server.mainLevel == this) return false; if (Server.mainLevel == this) return false;
if (name.Contains("&cMuseum ")) return false; if (IsMuseum) return false;
if (Server.lava.active && Server.lava.map == this) return false; if (Server.lava.active && Server.lava.map == this) return false;
if (LevelUnload != null) if (LevelUnload != null)
LevelUnload(this); LevelUnload(this);

View File

@ -30,7 +30,7 @@ namespace MCGalaxy {
byte b = level.GetTile(x, y, z); byte b = level.GetTile(x, y, z);
if ( b == Block.Zero ) { return; } if ( b == Block.Zero ) { return; }
if ( jailed || !agreed ) { RevertBlock(x, y, z); return; } if ( jailed || !agreed ) { RevertBlock(x, y, z); return; }
if ( level.name.Contains("Museum " + Server.DefaultColor) && Blockchange == null ) { if ( level.IsMuseum && Blockchange == null ) {
return; return;
} }
@ -65,7 +65,7 @@ namespace MCGalaxy {
lastClick[0] = x; lastClick[1] = y; lastClick[2] = z; lastClick[0] = x; lastClick[1] = y; lastClick[2] = z;
if ( Blockchange != null ) { if ( Blockchange != null ) {
if ( Blockchange.Method.ToString().IndexOf("AboutBlockchange") == -1 && !level.name.Contains("Museum " + Server.DefaultColor) ) { if ( Blockchange.Method.ToString().IndexOf("AboutBlockchange") == -1 && !level.IsMuseum ) {
bP.deleted = true; bP.deleted = true;
level.blockCache.Add(bP); level.blockCache.Add(bP);
} }
@ -1150,7 +1150,8 @@ try { SendBlockchange(pos1.x, pos1.y, pos1.z, Block.waterstill); } catch { }
} }
if( HasCpeExt(CpeExt.LongerMessages) && continued != 0 ) { if( HasCpeExt(CpeExt.LongerMessages) && continued != 0 ) {
storedMessage += text; if (text.Length < 64) storedMessage = storedMessage + text + " ";
else storedMessage = storedMessage + text;
return; return;
} }
@ -1501,7 +1502,7 @@ return;
} }
if (cmd != "repeat") lastCMD = cmd + " " + message; if (cmd != "repeat") lastCMD = cmd + " " + message;
if (level.name.Contains("Museum " + Server.DefaultColor) && !command.museumUsable ) { if (level.IsMuseum && !command.museumUsable ) {
SendMessage("Cannot use this command while in a museum!"); return; SendMessage("Cannot use this command while in a museum!"); return;
} }
if ((joker || muted) && cmd == "me") { if ((joker || muted) && cmd == "me") {