C# Class Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.PlayerHandler

Handles player connects and disconnects and keep a dictionary of all logged in players. Raises events when a player is added or removed from the list, and can sync with ingame player lists.
Exibir arquivo Open project: Bertware/bukkitgui2

Private Properties

Property Type Description
HandlePlayerDisconnect void
HandlePlayerJoin void
RaisePlayerListAdditionEvent void
RaisePlayerListChangedEvent void
RaisePlayerListDeletionEvent void

Public Methods

Method Description
AddPlayer ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void

Add a player to the online players list and raise the according events

GetOnlinePlayerByName ( String name ) : Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player

Get an online player by their name

GetOnlinePlayerCount ( ) : int

Get the amount of online players

GetOnlinePlayerNames ( ) : IEnumerable

Get the online players

GetOnlinePlayers ( ) : IEnumerable

Get the online players

Initialize ( ) : void

Initialize the PlayerHandler class

IsPlayerListed ( String name ) : System.Boolean

Check if a player is listed in the dictionarry of online players

RemovePlayer ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void

Remove a player from the online players list and raise the according events

Private Methods

Method Description
HandlePlayerDisconnect ( string text, Net.Bertware.Bukkitgui2.MinecraftInterop.OutputHandler.OutputParseResult outputParseResult, IPlayerAction playeraction ) : void

Handle a player disconnect event

HandlePlayerJoin ( string text, Net.Bertware.Bukkitgui2.MinecraftInterop.OutputHandler.OutputParseResult outputparseresult, IPlayerAction playeraction ) : void

Handle a player join event

RaisePlayerListAdditionEvent ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void

Raise a PlayerListAddition event

RaisePlayerListChangedEvent ( ) : void
RaisePlayerListDeletionEvent ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void

Raise a PlayerListDeletion event

Method Details

AddPlayer() public static method

Add a player to the online players list and raise the according events
public static AddPlayer ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void
player Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player The player to add
return void

GetOnlinePlayerByName() public static method

Get an online player by their name
public static GetOnlinePlayerByName ( String name ) : Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player
name String
return Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player

GetOnlinePlayerCount() public static method

Get the amount of online players
public static GetOnlinePlayerCount ( ) : int
return int

GetOnlinePlayerNames() public static method

Get the online players
public static GetOnlinePlayerNames ( ) : IEnumerable
return IEnumerable

GetOnlinePlayers() public static method

Get the online players
public static GetOnlinePlayers ( ) : IEnumerable
return IEnumerable

Initialize() public static method

Initialize the PlayerHandler class
public static Initialize ( ) : void
return void

IsPlayerListed() public static method

Check if a player is listed in the dictionarry of online players
public static IsPlayerListed ( String name ) : System.Boolean
name String The name of the player to check
return System.Boolean

RemovePlayer() public static method

Remove a player from the online players list and raise the according events
public static RemovePlayer ( Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player player ) : void
player Net.Bertware.Bukkitgui2.MinecraftInterop.PlayerHandler.Player The player to remove
return void