formatted code
This commit is contained in:
@@ -68,7 +68,7 @@ namespace ReallifeGamemode.Server.Services
|
||||
{
|
||||
NAPI.Pools.GetAllPlayers().ForEach(p =>
|
||||
{
|
||||
if(p.GetUser()?.IsAdmin(minLevel) ?? false)
|
||||
if (p.GetUser()?.IsAdmin(minLevel) ?? false)
|
||||
{
|
||||
p.SendChatMessage(message);
|
||||
}
|
||||
|
||||
@@ -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