diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 43e1f3be..22aa0897 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -277,6 +277,8 @@ namespace TShockAPI [Description("The number of reserved slots past your max server slot that can be joined by reserved players")] public bool LogRest = false; + [Description("The number of seconds a player must wait before being respawned.")] public int RespawnSeconds = 3; + /// /// Reads a configuration file from a given path /// diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 73d03f4e..8e502edf 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -715,7 +715,7 @@ namespace TShockAPI { player.ProjectileThreshold = 0; } - if (player.Dead && (DateTime.Now - player.LastDeath).Seconds >= 3 && player.Difficulty != 2) + if (player.Dead && (DateTime.Now - player.LastDeath).Seconds >= Config.RespawnSeconds && player.Difficulty != 2) { player.Spawn(); }