Making a plugin with SetHome
I need to implement a check for the player to be in the List
I explain when a player uses a teleport, I add it to List<T>
private readonly List<ulong> UserIdTP = new List<ulong>(); // Here I created a field where the player will be storedFurther after the teleport, I add it there
UserIdTP.Add(userid);And I start the timer which, after the expiration, delete it from there
timer.Once(cfg.timetpPlayer, () => UserIdTP.Remove(userid));Now I need to make a check, if the timer has not expired, and the player is in the List, then he is forbidden to use the teleport
if(UserIdTP.Contains(userid))
{
ShowUI(player,$"Телепорт не доступен: {cfg.timetpPlayer} сек.");
return;Unfortunately it doesn't work, what's the problem?