Search Results for

    Show / Hide Table of Contents

    Class OpenPlayerManager

    Holds all player's connected to the OpenServer instance.

    Inheritance
    System.Object
    OpenPlayerManager
    Implements
    IEventHandler
    Namespace: OpenAPI.Player
    Assembly: OpenAPI.dll
    Syntax
    public class OpenPlayerManager : PlayerFactory, IEventHandler

    Constructors

    | Improve this Doc View Source

    OpenPlayerManager(OpenApi)

    Creates a new instance of the OpenPlayerManager

    Declaration
    public OpenPlayerManager(OpenApi plugin)
    Parameters
    Type Name Description
    OpenApi plugin

    Methods

    | Improve this Doc View Source

    AddPlayer(PlayerJoinEvent)

    Declaration
    public void AddPlayer(PlayerJoinEvent e)
    Parameters
    Type Name Description
    PlayerJoinEvent e
    | Improve this Doc View Source

    CreatePlayer(MiNetServer, IPEndPoint, PlayerInfo)

    Declaration
    public override MiNET.Player CreatePlayer(MiNetServer server, IPEndPoint endPoint, PlayerInfo playerInfo)
    Parameters
    Type Name Description
    MiNetServer server
    IPEndPoint endPoint
    PlayerInfo playerInfo
    Returns
    Type Description
    MiNET.Player
    | Improve this Doc View Source

    GetPlayers()

    Get an array of currently connected players

    Declaration
    public OpenPlayer[] GetPlayers()
    Returns
    Type Description
    OpenPlayer[]

    A list of Players

    | Improve this Doc View Source

    RemovePlayer(PlayerQuitEvent)

    Declaration
    public void RemovePlayer(PlayerQuitEvent e)
    Parameters
    Type Name Description
    PlayerQuitEvent e
    | Improve this Doc View Source

    TryGetPlayer(String, out OpenPlayer, StringComparison)

    Get a player by username

    Declaration
    public bool TryGetPlayer(string name, out OpenPlayer player, StringComparison stringComparison = null)
    Parameters
    Type Name Description
    System.String name

    The username to lookup

    OpenPlayer player

    If a match was found, returns the best match. Otherwise returns null.

    StringComparison stringComparison

    The string comparison mode to use, defaults to InvariantCultureIgnoreCase

    Returns
    Type Description
    System.Boolean

    True if a player was found

    | Improve this Doc View Source

    TryGetPlayers(String, out OpenPlayer[], StringComparison)

    Get's an array of players based on their username

    Declaration
    public bool TryGetPlayers(string name, out OpenPlayer[] player, StringComparison stringComparison = null)
    Parameters
    Type Name Description
    System.String name

    The username to lookup

    OpenPlayer[] player

    If a match was found, returns a list of matches. Otherwise returns null.

    StringComparison stringComparison

    The string comparison mode to use, defaults to InvariantCultureIgnoreCase

    Returns
    Type Description
    System.Boolean

    Implements

    IEventHandler
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX