mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Allow option in server.properties to disable world change messages
This commit is contained in:
parent
b1a506257d
commit
c33862b400
@ -75,7 +75,7 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
|
||||
internal static BlockDefinition[] Load(bool global, string mapName) {
|
||||
public static BlockDefinition[] Load(bool global, string mapName) {
|
||||
BlockDefinition[] defs = null;
|
||||
string path = global ? GlobalPath : "blockdefs/lvl_" + mapName + ".json";
|
||||
try {
|
||||
@ -115,7 +115,7 @@ namespace MCGalaxy {
|
||||
return adjDefs;
|
||||
}
|
||||
|
||||
internal static void Save(bool global, Level lvl) {
|
||||
public static void Save(bool global, Level lvl) {
|
||||
BlockDefinition[] defs = global ? GlobalDefs : lvl.CustomBlockDefs;
|
||||
// We don't want to save global blocks in the level's custom blocks list
|
||||
if (!global) {
|
||||
|
@ -120,8 +120,10 @@ namespace MCGalaxy {
|
||||
CheckGamesJoin(p, oldLevel);
|
||||
|
||||
if (p.level.ShouldShowJoinMessage(oldLevel)) {
|
||||
if (ServerConfig.ShowWorldChanges) {
|
||||
string msg = p.level.IsMuseum ? " %Swent to the " : " %Swent to ";
|
||||
Chat.MessageGlobal(p, p.ColoredName + msg + lvl.ColoredName, false, true);
|
||||
}
|
||||
OnPlayerActionEvent.Call(p, PlayerAction.JoinWorld, lvl.name);
|
||||
}
|
||||
return true;
|
||||
|
@ -119,6 +119,8 @@ namespace MCGalaxy {
|
||||
public static bool GuestJoinsNotify = true;
|
||||
[ConfigBool("guest-leave-notify", "Other", true)]
|
||||
public static bool GuestLeavesNotify = true;
|
||||
[ConfigBool("show-world-changes", "Other", true)]
|
||||
public static bool ShowWorldChanges = true;
|
||||
|
||||
[ConfigBool("kick-on-hackrank", "Other", true)]
|
||||
public static bool HackrankKicks = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user