mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-03 02:21:53 -04:00
let map change messages show in Local Chat maps
and only show if joining/leaving the specific local-chat map
This commit is contained in:
parent
6508dc3fca
commit
b1b44b4bf4
@ -136,12 +136,17 @@ namespace MCGalaxy {
|
|||||||
|
|
||||||
announce = !p.hidden && Server.Config.IRCShowWorldChanges;
|
announce = !p.hidden && Server.Config.IRCShowWorldChanges;
|
||||||
string msg = p.level.IsMuseum ? "λNICK %Swent to the " : "λNICK %Swent to ";
|
string msg = p.level.IsMuseum ? "λNICK %Swent to the " : "λNICK %Swent to ";
|
||||||
Chat.MessageFrom(ChatScope.Global, p, msg + lvl.ColoredName,
|
Chat.MessageFrom(ChatScope.All, p, msg + lvl.ColoredName,
|
||||||
null, FilterGoto(p), announce);
|
null, FilterGoto(p, prev, lvl), announce);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ChatMessageFilter FilterGoto(Player source) {
|
static ChatMessageFilter FilterGoto(Player source, Level prev, Level lvl) {
|
||||||
return (pl, obj) => Entities.CanSee(pl, source) && !pl.Ignores.WorldChanges;
|
return (pl, obj) =>
|
||||||
|
(Chat.FilterGlobal(pl, obj) ||
|
||||||
|
Chat.FilterLevel(pl, prev) ||
|
||||||
|
Chat.FilterLevel(pl, lvl)) &&
|
||||||
|
Entities.CanSee(pl, source) &&
|
||||||
|
!pl.Ignores.WorldChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Respawn(Player p) {
|
public static void Respawn(Player p) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user