afk status shared data

This commit is contained in:
hydrant
2021-04-15 13:17:55 +02:00
parent 24112ef5b5
commit 3a37e4683c
2 changed files with 7 additions and 2 deletions

View File

@@ -138,7 +138,12 @@ namespace ReallifeGamemode.Server.Extensions
public static bool IsAfk(this Player player)
{
return player.GetServerData("isAfk", false);
if(!player.HasSharedData("isAfk"))
{
return false;
}
return player.GetSharedData<bool>("isAfk");
}
public static bool IsAlive(this Player player)