formatted code
This commit is contained in:
@@ -25,15 +25,15 @@ namespace ReallifeGamemode.Server.Services
|
||||
|
||||
List<Client> playerList = NAPI.Pools.GetAllPlayers();
|
||||
|
||||
if(int.TryParse(nameOrId, out int id))
|
||||
if (int.TryParse(nameOrId, out int id))
|
||||
{
|
||||
toReturn = playerList.Find(p => p.Handle.Value == id);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
toReturn = playerList.Find(p => p.Name.ToLower() == nameOrId);
|
||||
|
||||
if(toReturn == null)
|
||||
if (toReturn == null)
|
||||
{
|
||||
toReturn = playerList.Find(p => p.Name.ToLower().StartsWith(nameOrId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user