mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 20:16:36 -04:00
Fix colour bleeding in /who when on a museum map (Thanks fam0r)
This commit is contained in:
parent
551459a451
commit
8aa3a1e7da
@ -110,7 +110,8 @@ namespace MCGalaxy.Commands.Info {
|
||||
}
|
||||
|
||||
builder.Append(name);
|
||||
builder.Append(" (").Append(pl.level.name).Append("),");
|
||||
string lvlName = Colors.StripColors(pl.level.name); // for museums
|
||||
builder.Append(" (").Append(lvlName).Append("),");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using MCGalaxy.Generator;
|
||||
|
||||
@ -43,7 +42,8 @@ namespace MCGalaxy.Commands.World {
|
||||
string name = args[0].ToLower();
|
||||
if (!CheckMapAxis(p, args[1], "Width", ref x)) return false;
|
||||
if (!CheckMapAxis(p, args[2], "Height", ref y)) return false;
|
||||
if (!CheckMapAxis(p, args[3], "Length", ref z)) return false;
|
||||
if (!CheckMapAxis(p, args[3], "Length", ref z)) return false;
|
||||
if (!CheckMapVolume(p, x, y, z)) return true;
|
||||
string seed = args.Length == 6 ? args[5] : "";
|
||||
|
||||
if (!Formatter.ValidName(p, name, "level")) return false;
|
||||
|
@ -33,19 +33,21 @@ namespace MCGalaxy {
|
||||
[ConfigString("MOTD", "General", null, "ignore", true, null, 128)]
|
||||
public string motd = "ignore";
|
||||
|
||||
public string ColoredName {
|
||||
public string Color {
|
||||
get {
|
||||
LevelPermission maxPerm = permissionvisit;
|
||||
if (maxPerm < permissionbuild) maxPerm = permissionbuild;
|
||||
return Group.GetColor(maxPerm) + name;
|
||||
return Group.GetColor(maxPerm);
|
||||
}
|
||||
}
|
||||
|
||||
public string ColoredName { get { return Color + name; } }
|
||||
|
||||
public byte rotx, roty;
|
||||
public ushort spawnx, spawny, spawnz;
|
||||
public Position SpawnPos { get { return new Position(16 + spawnx * 32, 32 + spawny * 32, 16 + spawnz * 32); } }
|
||||
public Orientation SpawnRot { get { return new Orientation(rotx, roty); } }
|
||||
|
||||
|
||||
public BlockDefinition[] CustomBlockDefs;
|
||||
public BlockProps[] CustomBlockProps;
|
||||
public ExtrasCollection Extras = new ExtrasCollection();
|
||||
|
Loading…
x
Reference in New Issue
Block a user