From b88d1f562fc1423b5bf1c80c856e9fd089371bab Mon Sep 17 00:00:00 2001 From: stacey <57187883+moisterrific@users.noreply.github.com> Date: Thu, 15 Jul 2021 15:48:27 -0400 Subject: [PATCH] Add player count support for MOTD --- TShockAPI/TSPlayer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 25e61612..12ba09ad 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -1528,6 +1528,7 @@ namespace TShockAPI foo = foo.Replace("%map%", (TShock.Config.Settings.UseServerName ? TShock.Config.Settings.ServerName : Main.worldName)); foo = foo.Replace("%players%", String.Join(",", players)); foo = foo.Replace("%specifier%", TShock.Config.Settings.CommandSpecifier); + foo = foo.Replace("%playercount%", String.Join("/", TShock.Utils.GetActivePlayerCount(), TShock.Config.MaxSlots)); SendMessage(foo, lineColor); }