Class PlayerServiceExtensions
Namespace: Void.Minecraft.Players.Extensions
Assembly: Void.Minecraft.dll
Provides Minecraft-profile lookup operations for the proxy player service.
public static class PlayerServiceExtensionsInheritance
object ← PlayerServiceExtensions
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
TryGetByName(IPlayerService, string, out IPlayer?)
Attempts to find a Minecraft player by authenticated profile name.
public static bool TryGetByName(this IPlayerService players, string username, out IPlayer? player)Parameters
players IPlayerService
The player service to search.
username string
The profile name to match using an invariant-culture, case-insensitive comparison.
player IPlayer?
When this method returns true, the first matching player; otherwise, null.
Returns
true when a matching Minecraft profile is found; otherwise, false.