diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index 4d0a8dbd..b3e91a02 100644
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -822,7 +822,7 @@ namespace TShockAPI
/// args - The EventArgs object.
private void OnPostInit(EventArgs args)
{
- SetConsoleTitle(false);
+ Utils.SetConsoleTitle(false);
//This is to prevent a bug where a CLI-defined password causes packets to be
//sent in an unexpected order, resulting in clients being unable to connect
@@ -1179,17 +1179,7 @@ namespace TShockAPI
}
}
}
- SetConsoleTitle(false);
- }
-
- /// SetConsoleTitle - Updates the console title with some pertinent information.
- /// empty - True/false if the server is empty; determines if we should use Utils.ActivePlayers() for player count or 0.
- private void SetConsoleTitle(bool empty)
- {
- Console.Title = string.Format("{0}{1}/{2} on {3} @ {4}:{5} (TShock for Terraria v{6})",
- !string.IsNullOrWhiteSpace(Config.ServerName) ? Config.ServerName + " - " : "",
- empty ? 0 : Utils.ActivePlayers(),
- Config.MaxSlots, Main.worldName, Netplay.ServerIP.ToString(), Netplay.ListenPort, Version);
+ Utils.SetConsoleTitle(false);
}
/// OnHardUpdate - Fired when a hardmode tile update event happens.
@@ -1435,7 +1425,7 @@ namespace TShockAPI
{
if (Config.SaveWorldOnLastPlayerExit)
SaveManager.Instance.SaveWorld();
- SetConsoleTitle(true);
+ Utils.SetConsoleTitle(true);
}
}
diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs
index 3304acb4..eaa62dd3 100644
--- a/TShockAPI/Utils.cs
+++ b/TShockAPI/Utils.cs
@@ -1429,7 +1429,7 @@ namespace TShockAPI
}
/// FixChestStacks - Verifies that each stack in each chest is valid and not over the max stack count.
- public void FixChestStacks()
+ internal void FixChestStacks()
{
if (TShock.Config.IgnoreChestStacksOnLoad)
return;
@@ -1446,5 +1446,15 @@ namespace TShockAPI
}
}
}
+
+ /// SetConsoleTitle - Updates the console title with some pertinent information.
+ /// empty - True/false if the server is empty; determines if we should use Utils.ActivePlayers() for player count or 0.
+ internal void SetConsoleTitle(bool empty)
+ {
+ Console.Title = string.Format("{0}{1}/{2} on {3} @ {4}:{5} (TShock for Terraria v{6})",
+ !string.IsNullOrWhiteSpace(TShock.Config.ServerName) ? TShock.Config.ServerName + " - " : "",
+ empty ? 0 : ActivePlayers(),
+ TShock.Config.MaxSlots, Main.worldName, Netplay.ServerIP.ToString(), Netplay.ListenPort, TShock.VersionNum);
+ }
}
}