Merge remote-tracking branch 'punchready/general-devel' into general-devel

This commit is contained in:
Lucas Nicodemus 2022-10-07 20:41:46 -07:00
commit 83427106a5
No known key found for this signature in database
3 changed files with 82 additions and 4 deletions

View file

@ -1511,7 +1511,7 @@ namespace TShockAPI
}
}
if (TShock.Utils.TryParseTime(duration, out int seconds))
if (TShock.Utils.TryParseTime(duration, out ulong seconds))
{
expiration = DateTime.UtcNow.AddSeconds(seconds);
}
@ -1879,7 +1879,7 @@ namespace TShockAPI
if (args.Parameters.Count > 2)
{
int time;
ulong time;
if (!TShock.Utils.TryParseTime(args.Parameters[2], out time))
{
args.Player.SendErrorMessage("Invalid time string! Proper format: _d_h_m_s, with at least one time specifier.");
@ -1887,7 +1887,7 @@ namespace TShockAPI
return;
}
ply[0].tempGroupTimer = new System.Timers.Timer(time * 1000);
ply[0].tempGroupTimer = new System.Timers.Timer(time * 1000d);
ply[0].tempGroupTimer.Elapsed += ply[0].TempGroupTimerElapsed;
ply[0].tempGroupTimer.Start();
}