mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 20:16:36 -04:00
code cleanup and make changing /map chat instantly change tab list
This commit is contained in:
parent
cc6b8dd4c0
commit
4784fe297b
@ -108,7 +108,7 @@ namespace MCGalaxy.Commands.World {
|
|||||||
|
|
||||||
p.Message("%TGeneral settings:");
|
p.Message("%TGeneral settings:");
|
||||||
p.Message(" MOTD: &b" + cfg.MOTD);
|
p.Message(" MOTD: &b" + cfg.MOTD);
|
||||||
p.Message(" Roleplay (local level only) chat: " + GetBool(!cfg.ServerWideChat));
|
p.Message(" Local level only chat: " + GetBool(!cfg.ServerWideChat));
|
||||||
p.Message(" Load on /goto: {0}%S, Auto unload: {1}",
|
p.Message(" Load on /goto: {0}%S, Auto unload: {1}",
|
||||||
GetBool(cfg.LoadOnGoto), GetBool(cfg.AutoUnload));
|
GetBool(cfg.LoadOnGoto), GetBool(cfg.AutoUnload));
|
||||||
p.Message(" Buildable: {0}%S, Deletable: {1}%S, Drawing: {2}",
|
p.Message(" Buildable: {0}%S, Deletable: {1}%S, Drawing: {2}",
|
||||||
|
@ -43,9 +43,11 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void GetEntry(Player p, Player dst, out string name, out string group) {
|
static void GetEntry(Player p, Player dst, out string name, out string group) {
|
||||||
LevelConfig config = LevelInfo.GetConfig(p.level.name, out p.level);
|
string map = p.level.name;
|
||||||
string levelName = config.ServerWideChat ? p.level.name : p.level.name + Server.Config.DefaultColor+" <Local chat>";
|
// TODO: Make %S work with tab list names
|
||||||
group = Server.Config.TablistGlobal ? "On " + levelName : "&fPlayers";
|
if (!p.level.SeesServerWideChat) map += Server.Config.DefaultColor + " <Local chat>";
|
||||||
|
|
||||||
|
group = Server.Config.TablistGlobal ? "On " + map : "&fPlayers";
|
||||||
name = dst.Ignores.Nicks ? p.color + p.truename : p.ColoredName;
|
name = dst.Ignores.Nicks ? p.color + p.truename : p.ColoredName;
|
||||||
OnTabListEntryAddedEvent.Call(p, ref name, ref group, dst);
|
OnTabListEntryAddedEvent.Call(p, ref name, ref group, dst);
|
||||||
|
|
||||||
|
@ -140,8 +140,13 @@ namespace MCGalaxy {
|
|||||||
static void SetDeletable(Player p, Level l, string v) { TogglePerms(p, l, ref l.Config.Deletable, "Deletable"); }
|
static void SetDeletable(Player p, Level l, string v) { TogglePerms(p, l, ref l.Config.Deletable, "Deletable"); }
|
||||||
|
|
||||||
static void SetChat(Player p, Level l, string v) {
|
static void SetChat(Player p, Level l, string v) {
|
||||||
Toggle(p, l, ref l.Config.ServerWideChat, "Roleplay (local level only) chat", true);
|
Toggle(p, l, ref l.Config.ServerWideChat, "Local level only chat", true);
|
||||||
|
Player[] players = PlayerInfo.Online.Items;
|
||||||
|
foreach (Player pl in players) {
|
||||||
|
if (pl.level == l) TabList.Update(pl, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetDrawing(Player p, Level l, string v) {
|
static void SetDrawing(Player p, Level l, string v) {
|
||||||
Toggle(p, l, ref l.Config.Drawing, "Drawing commands");
|
Toggle(p, l, ref l.Config.Drawing, "Drawing commands");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user