Class WarfarePlayer
[CannotApplyEqualityOperator]
public class WarfarePlayer : IPlayer, ITranslationArgument, ICommandUser, IModerationActor, IComponentContainer<IPlayerComponent>, IComponentContainer, IEquatable<IPlayer>, IEquatable<WarfarePlayer>, ISpotter, ITransformObject
- Inheritance
-
WarfarePlayer
- Implements
- Inherited Members
- Extension Methods
Fields
FormatCharacterName
public static readonly SpecialFormat FormatCharacterName
Field Value
FormatColoredCharacterName
public static readonly SpecialFormat FormatColoredCharacterName
Field Value
FormatColoredDisplayOrCharacterName
public static readonly SpecialFormat FormatColoredDisplayOrCharacterName
Field Value
FormatColoredDisplayOrNickName
public static readonly SpecialFormat FormatColoredDisplayOrNickName
Field Value
FormatColoredDisplayOrPlayerName
public static readonly SpecialFormat FormatColoredDisplayOrPlayerName
Field Value
FormatColoredNickName
public static readonly SpecialFormat FormatColoredNickName
Field Value
FormatColoredPlayerName
public static readonly SpecialFormat FormatColoredPlayerName
Field Value
FormatColoredSteam64
public static readonly SpecialFormat FormatColoredSteam64
Field Value
FormatDisplayOrCharacterName
public static readonly SpecialFormat FormatDisplayOrCharacterName
Field Value
FormatDisplayOrNickName
public static readonly SpecialFormat FormatDisplayOrNickName
Field Value
FormatDisplayOrPlayerName
public static readonly SpecialFormat FormatDisplayOrPlayerName
Field Value
FormatNickName
public static readonly SpecialFormat FormatNickName
Field Value
FormatPlayerName
public static readonly SpecialFormat FormatPlayerName
Field Value
FormatSteam64
public static readonly SpecialFormat FormatSteam64
Field Value
Properties
CachedPoints
public ref PlayerPoints CachedPoints { get; }
Property Value
CachedReputation
public double CachedReputation { get; }
Property Value
CanInfluenceObjective
public bool CanInfluenceObjective { get; }
Property Value
Components
List of auto-added components.
public IReadOnlyList<IPlayerComponent> Components { get; }
Property Value
Connection
public ITransportConnection Connection { get; }
Property Value
- ITransportConnection
CurrentSession
public SessionRecord CurrentSession { get; }
Property Value
Data
Generic data persisting over the player's lifetime.
public ConcurrentDictionary<string, object?> Data { get; }
Property Value
DisconnectToken
A CancellationToken that cancels after the player leaves.
public CancellationToken DisconnectToken { get; }
Property Value
DutyLevel
The player's current staff level. This will be correct even when off duty.
public DutyLevel DutyLevel { get; }
Property Value
Remarks
This should not be used for permission checks, instead proper permissions should be created for instances like that.
GroupId
The Steam64 ID of the group the player's in.
public CSteamID GroupId { get; }
Property Value
- CSteamID
IsConnecting
If the player's PlayerJoined event is still invoking.
public bool IsConnecting { get; }
Property Value
IsDisconnected
If the player this object represents is currently offline. Set to true after the leave event is fired.
public bool IsDisconnected { get; }
Property Value
IsDisconnecting
If the player this object represents is currently in the process of disconnecting.
public bool IsDisconnecting { get; }
Property Value
IsFirstTimePlaying
public bool IsFirstTimePlaying { get; }
Property Value
IsOnDuty
If the player is currently on duty.
public bool IsOnDuty { get; }
Property Value
Remarks
This should not be used for permission checks, instead proper permissions should be created for instances like that.
IsOnline
If the player this object represents is currently online. Set to false after the leave event is fired.
public bool IsOnline { get; }
Property Value
IsTesting
If this player was created for unit tests.
public bool IsTesting { get; }
Property Value
JoinTime
public DateTime JoinTime { get; }
Property Value
Locale
public WarfarePlayerLocale Locale { get; }
Property Value
Names
Structure including all variations of the player's names.
public ref PlayerNames Names { get; }
Property Value
Position
The world position of the object.
public Vector3 Position { get; set; }
Property Value
- Vector3
Exceptions
- GameThreadException
Not on main thread.
- NotSupportedException
Not able to set position.
Save
public BinaryPlayerSave Save { get; }
Property Value
Steam64
public ref readonly CSteamID Steam64 { get; }
Property Value
- CSteamID
SteamFriends
List of steam IDs of this player's friends, if theyre public.
public ulong[] SteamFriends { get; }
Property Value
- ulong[]
Remarks
Private profiles will just have an empty array here.
SteamPlayer
public SteamPlayer SteamPlayer { get; }
Property Value
- SteamPlayer
SteamSummary
public PlayerSummary SteamSummary { get; }
Property Value
Team
The team to show spotted effects to.
public Team Team { get; }
Property Value
Transform
public Transform Transform { get; }
Property Value
- Transform
UnturnedPlayer
public Player UnturnedPlayer { get; }
Property Value
- Player
Yaw
public float Yaw { get; }
Property Value
Methods
Component(Type)
Get the given component type from a list of components.
[Pure]
public object Component(Type t)
Parameters
tType
Returns
Remarks
Always returns a value or throws an exception.
Exceptions
- ComponentNotFoundException
Component not found.
ComponentOrNull(Type)
Get the given component type from a list of components.
[Pure]
public object? ComponentOrNull(Type t)
Parameters
tType
Returns
ComponentOrNull<TComponentType>()
Get the given component type from a list of components.
[Pure]
public TComponentType? ComponentOrNull<TComponentType>() where TComponentType : class, IPlayerComponent
Returns
- TComponentType
Type Parameters
TComponentType
Component<TComponentType>()
Get the given component type from a list of components.
[Pure]
public TComponentType Component<TComponentType>() where TComponentType : class, IPlayerComponent
Returns
- TComponentType
Type Parameters
TComponentType
Remarks
Always returns a value or throws an exception.
Exceptions
- ComponentNotFoundException
Component not found.
Equals(Player?)
public bool Equals(Player? other)
Parameters
otherPlayer
Returns
Equals(SteamPlayer?)
public bool Equals(SteamPlayer? other)
Parameters
otherSteamPlayer
Returns
Equals(SteamPlayerID?)
public bool Equals(SteamPlayerID? other)
Parameters
otherSteamPlayerID
Returns
Equals(CSteamID)
public bool Equals(CSteamID steam64)
Parameters
steam64CSteamID
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(ulong)
public bool Equals(ulong steam64)
Parameters
steam64ulong
Returns
Equals(IPlayer?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IPlayer? other)
Parameters
otherIPlayerAn object to compare with this object.
Returns
Equals(WarfarePlayer?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(WarfarePlayer? other)
Parameters
otherWarfarePlayerAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetModalHandle()
public ModalHandle GetModalHandle()
Returns
GetModerationActor()
Create an IModerationActor for this command actor.
public IModerationActor GetModerationActor()
Returns
Exceptions
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.