Force respawn after death.
(prevents some forms of invisibility)
This commit is contained in:
parent
8b59e1c525
commit
85f1ba6643
3 changed files with 9 additions and 0 deletions
|
|
@ -385,6 +385,11 @@ namespace TShockAPI
|
|||
}
|
||||
if (CheckPlayerCollision(player.TileX, player.TileY))
|
||||
player.SendMessage("You are currently nocliping!", Color.Red);
|
||||
if (player.LastDeath != null && player.ForceSpawn && (DateTime.Now - player.LastDeath).Seconds >= 3)
|
||||
{
|
||||
player.Spawn();
|
||||
player.ForceSpawn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue