diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6a4c90..1d783712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fixed erroneous kicks and bans when using `KickOnMediumcoreDeath` and `BanOnMediumcoreDeath` options. (@DankRank) * Removed `TSPlayer.InitSpawn` field. (@DankRank) * `OnPlayerSpawn`'s player ID field is now `PlayerId`. (@DankRank) +* `Utils.TryParseTime` can now take spaces (e.g., `3d 5h 2m 3s`) (@QuiCM) * Enabled banning unregistered users (@QuiCM) * Added filtering and validation on packet 96 (Teleport player through portal) (@QuiCM) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 1c4d681f..1ac60283 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -534,7 +534,7 @@ namespace TShockAPI var sb = new StringBuilder(3); for (int i = 0; i < str.Length; i++) { - if (Char.IsDigit(str[i]) || (str[i] == '-' || str[i] == '+')) + if (Char.IsDigit(str[i]) || (str[i] == '-' || str[i] == '+' || str[i] == ' ')) sb.Append(str[i]); else {