Table of Contents

Class PlayerInfo

Namespace
Archipelago.MultiClient.Net.Helpers
Assembly
Archipelago.MultiClient.Net.dll

Information about a specific player

public class PlayerInfo : IEquatable<PlayerInfo>
Inheritance
PlayerInfo
Implements
Inherited Members

Constructors

PlayerInfo()

Creates and Empty PlayerInfo object, should probably not even be exposed

public PlayerInfo()

PlayerInfo(int, int, string, string, string, NetworkSlot[], int[])

Creates an PlayerInfo object, used by json deserialization

[JsonConstructor]
public PlayerInfo(int team, int slot, string name, string alias, string game, NetworkSlot[] groups, int[] groupMembers)

Parameters

team int

The team of this player

slot int

The slot of this player

name string

The name of that player

alias string

The alias of that player

game string

The game the player is playing

groups NetworkSlot[]

An array of groups this player is part of

groupMembers int[]

An array of player slots that are is part of this player if its a group otherwise null

Properties

Alias

A custom name Alias for this player, that can optionally set with !alias, if no alias is set will return Name instead

public string Alias { get; }

Property Value

string

Game

The game the player is playing

public string Game { get; }

Property Value

string

Groups

A array of groups this player is part of

public NetworkSlot[] Groups { get; }

Property Value

NetworkSlot[]

IsGroup

Is true if the player is a group.

public bool IsGroup { get; }

Property Value

bool

Name

The name of that player

public string Name { get; }

Property Value

string

Slot

The slot of this player

public int Slot { get; }

Property Value

int

Team

The team of this player

public int Team { get; }

Property Value

int

Methods

Equals(PlayerInfo)

public bool Equals(PlayerInfo other)

Parameters

other PlayerInfo

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetGroupMembers(IPlayerHelper)

If this player is a group, gets its members. Otherwise returns null.

public IEnumerable<PlayerInfo> GetGroupMembers(IPlayerHelper playerHelper)

Parameters

playerHelper IPlayerHelper

Returns

IEnumerable<PlayerInfo>

returns the players info's of members from a group slot, or null if this slot is not a group

GetHashCode()

public override int GetHashCode()

Returns

int

IsRelatedTo(PlayerInfo)

True if this player is the same player, or if either player is a group (e.g. itemlinks) that contains the other player

public bool IsRelatedTo(PlayerInfo other)

Parameters

other PlayerInfo

Returns

bool

IsSharingGroupWith(int, int)

Checks if the provided team and slot, are sharing any slot groups with this player

[Obsolete]
public bool IsSharingGroupWith(int team, int slot)

Parameters

team int

The team to check

slot int

The slot to check

Returns

bool

Whether this player has any itemlinks in common with the specified player

ToString()

Returns the Alias of the player

public override string ToString()

Returns

string

Operators

operator ==(PlayerInfo, PlayerInfo)

public static bool operator ==(PlayerInfo lhs, PlayerInfo rhs)

Parameters

lhs PlayerInfo
rhs PlayerInfo

Returns

bool

implicit operator int(PlayerInfo)

Converts the PlayerInfo to the slot

public static implicit operator int(PlayerInfo p)

Parameters

p PlayerInfo

Returns

int

operator !=(PlayerInfo, PlayerInfo)

public static bool operator !=(PlayerInfo lhs, PlayerInfo rhs)

Parameters

lhs PlayerInfo
rhs PlayerInfo

Returns

bool