Search Results for

    Show / Hide Table of Contents

    Class Player

    Represents the in-game player, by encapsulating a ReferenceHub.

    Inheritance
    System.Object
    TypeCastObject<Player>
    Player
    Npc
    Implements
    IEntity
    IWorldSpace
    IPosition
    IRotation
    Inherited Members
    TypeCastObject<Player>.Cast<TObject>()
    TypeCastObject<Player>.Cast<TObject>(TObject)
    TypeCastObject<Player>.As<TObject>()
    TypeCastObject<Player>.Is<TObject>(TObject)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features
    Assembly: Exiled.API.dll
    Syntax
    public class Player : TypeCastObject<Player>, IEntity, IWorldSpace, IPosition, IRotation

    Constructors

    | Improve this Doc View Source

    Player(ReferenceHub)

    Initializes a new instance of the Player class.

    Declaration
    public Player(ReferenceHub referenceHub)
    Parameters
    Type Name Description
    ReferenceHub referenceHub

    The ReferenceHub of the player to be encapsulated.

    | Improve this Doc View Source

    Player(GameObject)

    Initializes a new instance of the Player class.

    Declaration
    public Player(GameObject gameObject)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    The UnityEngine.GameObject of the player.

    Properties

    | Improve this Doc View Source

    ActiveArtificialHealthProcesses

    Gets a System.Collections.Generic.IEnumerable<T> of all active Artificial Health processes on the player.

    Declaration
    public IEnumerable<AhpStat.AhpProcess> ActiveArtificialHealthProcesses { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<PlayerStatsSystem.AhpStat.AhpProcess>
    | Improve this Doc View Source

    ActiveEffects

    Gets all currently active CustomPlayerEffects.StatusEffectBase.

    Declaration
    public IEnumerable<StatusEffectBase> ActiveEffects { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<CustomPlayerEffects.StatusEffectBase>
    See Also
    EnableEffect(EffectType, Single, Boolean)
    EnableEffect(StatusEffectBase, Single, Boolean)
    EnableEffect(String, Single, Boolean)
    EnableEffect<T>(Single, Boolean)
    EnableEffects(IEnumerable<EffectType>, Single, Boolean)
    | Improve this Doc View Source

    AdminChatAccess

    Gets a value indicating whether or not the player has Admin Chat access.

    Declaration
    public bool AdminChatAccess { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    AgreedToRecording

    Gets a value indicating whether or not the player has agreed to microphone recording.

    Declaration
    public bool AgreedToRecording { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Ammo

    Gets the player's ammo.

    Declaration
    public Dictionary<ItemType, ushort> Ammo { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<ItemType, System.UInt16>
    | Improve this Doc View Source

    ArtificialHealth

    Gets or sets the player's artificial health. If the health is greater than the MaxArtificialHealth, it will also be changed to match the artificial health.

    Declaration
    public float ArtificialHealth { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    AuthenticationToken

    Gets the player's authentication token.

    Declaration
    public string AuthenticationToken { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    AuthenticationType

    Gets the player's authentication type.

    Declaration
    public AuthenticationType AuthenticationType { get; }
    Property Value
    Type Description
    AuthenticationType
    | Improve this Doc View Source

    BadgeHidden

    Gets or sets a value indicating whether or not the player's badge is hidden.

    Declaration
    public bool BadgeHidden { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CameraTransform

    Gets the encapsulated ReferenceHub's PlayerCameraReference.

    Declaration
    public Transform CameraTransform { get; }
    Property Value
    Type Description
    UnityEngine.Transform
    | Improve this Doc View Source

    ComponentsInChildren

    Declaration
    public IReadOnlyCollection<EActor> ComponentsInChildren { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<EActor>
    | Improve this Doc View Source

    Connection

    Gets player's Mirror.NetworkConnection.

    Declaration
    public NetworkConnection Connection { get; }
    Property Value
    Type Description
    Mirror.NetworkConnection
    | Improve this Doc View Source

    Cuffer

    Gets or sets a value indicating the Player that currently has the player cuffed.

    This value will be null if the player is not cuffed. Setting this value to null will uncuff the player if they are cuffed.

    Declaration
    public Player Cuffer { get; set; }
    Property Value
    Type Description
    Player
    | Improve this Doc View Source

    CurrentArmor

    Gets the armor that the player is currently wearing. Value will be null if the player is not wearing any armor.

    Declaration
    public Armor CurrentArmor { get; }
    Property Value
    Type Description
    Armor
    | Improve this Doc View Source

    CurrentHint

    Gets the hint currently watched by the player.

    Declaration
    public Hint CurrentHint { get; }
    Property Value
    Type Description
    Hint
    | Improve this Doc View Source

    CurrentItem

    Gets or sets the item in the player's hand. Value will be null if the player is not holding anything.

    Declaration
    public Item CurrentItem { get; set; }
    Property Value
    Type Description
    Item
    See Also
    DropHeldItem()
    | Improve this Doc View Source

    CurrentRoom

    Gets the current Room the player is in.

    Declaration
    public Room CurrentRoom { get; }
    Property Value
    Type Description
    Room
    | Improve this Doc View Source

    CurrentSpectatingPlayers

    Gets a Player System.Collections.Generic.IEnumerable<T> of spectators that are currently spectating this Player.

    Declaration
    public IEnumerable<Player> CurrentSpectatingPlayers { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Player>
    | Improve this Doc View Source

    CustomInfo

    Gets or sets the player's custom player info string. This string is displayed along with the player's InfoArea.

    Declaration
    public string CustomInfo { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    CustomName

    Gets or sets the player's nickname, if null it sets the original nickname.

    Declaration
    public string CustomName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    CustomRoleFriendlyFireMultiplier

    Gets or sets a System.Collections.Generic.Dictionary<TKey, TValue> containing cached System.String and their System.Collections.Generic.Dictionary<TKey, TValue> which is cached Role with FF multiplier. This is for unique custom roles.

    Declaration
    public Dictionary<string, Dictionary<RoleTypeId, float>> CustomRoleFriendlyFireMultiplier { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single>>
    Remarks

    Consider adding this as object, Dict so that CustomRoles, and Strings can be parsed.

    | Improve this Doc View Source

    CustomUserId

    Gets or sets the player's custom user id.

    Declaration
    [Obsolete("Remove by NW", true)]
    public string CustomUserId { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Dictionary

    Gets a System.Collections.Generic.Dictionary<TKey, TValue> containing all Player's on the server.

    Declaration
    public static Dictionary<GameObject, Player> Dictionary { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<UnityEngine.GameObject, Player>
    | Improve this Doc View Source

    DisplayNickname

    Gets or sets the player's nickname displayed to other player.

    Declaration
    public string DisplayNickname { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    DoNotTrack

    Gets a value indicating whether or not the player has Do Not Track (DNT) enabled. If this value is true, data about the player unrelated to server security shouldn't be stored.

    Declaration
    public bool DoNotTrack { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Footprint

    Gets the player's Footprinting.Footprint.

    Declaration
    public Footprint Footprint { get; }
    Property Value
    Type Description
    Footprinting.Footprint
    | Improve this Doc View Source

    FriendlyFireMultiplier

    Gets or sets a System.Collections.Generic.Dictionary<TKey, TValue> containing cached PlayerRoles.RoleTypeId and their FF multiplier. This is for non-unique roles.

    Declaration
    public Dictionary<RoleTypeId, float> FriendlyFireMultiplier { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single>
    | Improve this Doc View Source

    GameObject

    Gets the encapsulated UnityEngine.GameObject.

    Declaration
    public GameObject GameObject { get; }
    Property Value
    Type Description
    UnityEngine.GameObject
    | Improve this Doc View Source

    GlobalBadge

    Gets the global badge of the player. Value will be null if the player does not have a global badge.

    Declaration
    public Badge? GlobalBadge { get; }
    Property Value
    Type Description
    System.Nullable<Badge>
    | Improve this Doc View Source

    Group

    Gets or sets the player's group.

    Declaration
    public UserGroup Group { get; set; }
    Property Value
    Type Description
    UserGroup
    | Improve this Doc View Source

    GroupName

    Gets or sets the player's group name.

    Declaration
    public string GroupName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    HasCustomName

    Gets a value indicating whether or not the player has an active CustomName.

    Declaration
    public bool HasCustomName { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasFlashlightModuleEnabled

    Gets a value indicating whether or not the player has enabled weapon's flashlight module.

    Declaration
    public bool HasFlashlightModuleEnabled { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasHint

    Gets a value indicating whether or not the player is viewing a hint.

    Declaration
    public bool HasHint { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasReservedSlot

    Gets a value indicating whether or not the player has a reserved slot.

    Declaration
    public bool HasReservedSlot { get; }
    Property Value
    Type Description
    System.Boolean
    See Also
    GiveReservedSlot(Boolean)
    AddReservedSlot(String, Boolean)
    | Improve this Doc View Source

    Health

    Gets or sets the player's health. If the health is greater than the MaxHealth, the MaxHealth will also be changed to match the health.

    Declaration
    public float Health { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    HintDisplay

    Gets the Hints.HintDisplay of the player.

    Declaration
    public HintDisplay HintDisplay { get; }
    Property Value
    Type Description
    Hints.HintDisplay
    | Improve this Doc View Source

    HumeShield

    Gets or sets the player's Hume Shield.

    Declaration
    public float HumeShield { get; set; }
    Property Value
    Type Description
    System.Single
    Remarks

    This value can bypass the role's hume shield maximum. However, this value will only be visible to the end-player as Hume Shield if IsHumeShieldedRole is true. Otherwise, the game will treat the player as though they have the amount of Hume Shield specified, even though they cannot see it.

    | Improve this Doc View Source

    HumeShieldStat

    Gets the player's PlayerStatsSystem.HumeShieldStat.

    Declaration
    public HumeShieldStat HumeShieldStat { get; }
    Property Value
    Type Description
    PlayerStatsSystem.HumeShieldStat
    | Improve this Doc View Source

    Id

    Gets or sets the player's id.

    Declaration
    public int Id { get; set; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    InfoArea

    Gets or sets the player's player info area bitmask. This property can be used to hide player name elements, such as the player's name, badges, etc.

    Declaration
    public PlayerInfoArea InfoArea { get; set; }
    Property Value
    Type Description
    PlayerInfoArea
    | Improve this Doc View Source

    InfoViewRange

    Gets or sets the range at which this player's info can be viewed by others.

    Declaration
    public float InfoViewRange { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Inventory

    Gets the player's InventorySystem.Inventory.

    Declaration
    public Inventory Inventory { get; }
    Property Value
    Type Description
    InventorySystem.Inventory
    | Improve this Doc View Source

    IPAddress

    Gets the player's IP address.

    Declaration
    public string IPAddress { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    IsAimingDownWeapon

    Gets a value indicating whether or not the player is aiming with a weapon.

    Declaration
    public bool IsAimingDownWeapon { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsAlive

    Gets a value indicating whether or not the player is alive.

    Declaration
    public bool IsAlive { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsBypassModeEnabled

    Gets or sets a value indicating whether or not the player's bypass mode is enabled.

    Declaration
    public bool IsBypassModeEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsCHI

    Gets a value indicating whether or not the player's PlayerRoles.RoleTypeId is any Chaos rank. Equivalent to checking the player's PlayerRoles.Team.

    Declaration
    public bool IsCHI { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsConnected

    Gets a value indicating whether the player is fully connected to the server.

    Declaration
    public bool IsConnected { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsCuffed

    Gets a value indicating whether or not the player is cuffed.

    Declaration
    public bool IsCuffed { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Players can be cuffed without another player being the cuffer.

    | Improve this Doc View Source

    IsDead

    Gets a value indicating whether or not the player is dead.

    Declaration
    public bool IsDead { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsFriendlyFireEnabled

    Gets a value indicating whether or not the player's friendly fire is enabled.
    This property only determines if this player can deal damage to players on the same team;

    This player can be damaged by other players on their own team even if this property is false.

    Declaration
    public bool IsFriendlyFireEnabled { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsGlobalModerator

    Gets a value indicating whether or not the player is a global moderator.

    Declaration
    public bool IsGlobalModerator { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsGlobalMuted

    Gets or sets a value indicating whether or not the player is global muted.

    Declaration
    public bool IsGlobalMuted { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property will NOT persistently mute and unmute the player. For persistent mutes, see Mute(Boolean) and UnMute(Boolean).

    | Improve this Doc View Source

    IsGodModeEnabled

    Gets or sets a value indicating whether or not the player has godmode enabled.

    Declaration
    public bool IsGodModeEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsHost

    Gets a value indicating whether or not the player is the host.

    Declaration
    public bool IsHost { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsHuman

    Gets a value indicating whether or not the player's PlayerRoles.RoleTypeId is any human rank.

    Declaration
    public bool IsHuman { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsInPocketDimension

    Gets a value indicating whether or not the player is in the pocket dimension.

    Declaration
    public bool IsInPocketDimension { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsIntercomMuted

    Gets or sets a value indicating whether or not the player is intercom muted.

    Declaration
    public bool IsIntercomMuted { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property will NOT persistently mute and unmute the player. For persistent mutes, see Mute(Boolean) and UnMute(Boolean).

    | Improve this Doc View Source

    IsInventoryEmpty

    Gets a value indicating whether or not the player's inventory is empty.

    Declaration
    public bool IsInventoryEmpty { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsInventoryFull

    Gets a value indicating whether or not the player's inventory is full.

    Declaration
    public bool IsInventoryFull { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsJumping

    Gets a value indicating whether or not the player is jumping.

    Declaration
    public bool IsJumping { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsMuted

    Gets or sets a value indicating whether or not the player is muted.

    Declaration
    public bool IsMuted { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property will NOT persistently mute and unmute the player. For persistent mutes, see Mute(Boolean) and UnMute(Boolean).

    | Improve this Doc View Source

    IsNoclipPermitted

    Gets or sets a value indicating whether or not the player is allowed to enter noclip mode.

    Declaration
    public bool IsNoclipPermitted { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    For forcing the player into noclip mode, see IsNoclipEnabled.

    See Also
    IsNoclipEnabled
    | Improve this Doc View Source

    IsNorthwoodStaff

    Gets a value indicating whether or not the player is Northwood staff.

    Declaration
    public bool IsNorthwoodStaff { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsNPC

    Gets or sets a value indicating whether or not the player is a NPC.

    Declaration
    public bool IsNPC { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsNTF

    Gets a value indicating whether or not the player's PlayerRoles.RoleTypeId is any NTF rank. Equivalent to checking the player's PlayerRoles.Team.

    Declaration
    public bool IsNTF { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsOverwatchEnabled

    Gets or sets a value indicating whether or not the player's overwatch is enabled.

    Declaration
    public bool IsOverwatchEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsReloading

    Gets a value indicating whether or not the player is reloading a weapon.

    Declaration
    public bool IsReloading { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsScp

    Gets a value indicating whether or not the player's PlayerRoles.RoleTypeId is any SCP. Equivalent to checking the player's PlayerRoles.Team.

    Declaration
    public bool IsScp { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsSpawnProtected

    Gets or sets a value indicating whether or not the player is spawn protected.

    Declaration
    public bool IsSpawnProtected { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsSpeaking

    Gets a value indicating whether or not the player is speaking.

    Declaration
    public bool IsSpeaking { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsStaffBypassEnabled

    Gets a value indicating whether or not the staff bypass is enabled.

    Declaration
    public bool IsStaffBypassEnabled { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsTransmitting

    Gets a value indicating whether or not the player is transmitting on a Radio.

    Declaration
    public bool IsTransmitting { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsTutorial

    Gets a value indicating whether or not the player's PlayerRoles.RoleTypeId is equal to PlayerRoles.RoleTypeId.Tutorial.

    Declaration
    public bool IsTutorial { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsUsingStamina

    Gets or sets a value indicating whether or not the player should use stamina system.

    Declaration
    public bool IsUsingStamina { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsVerified

    Gets a value indicating whether or not the player is verified.

    Declaration
    public bool IsVerified { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This is always false if online_mode is set to false.

    | Improve this Doc View Source

    IsWhitelisted

    Gets a value indicating whether or not the player is in whitelist.

    Declaration
    public bool IsWhitelisted { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    It will always return true if a whitelist is disabled on the server.

    See Also
    GrantWhitelist(Boolean)
    AddToWhitelist(String, Boolean)
    | Improve this Doc View Source

    Items

    Gets the player's items.

    Declaration
    public IReadOnlyCollection<Item> Items { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<Item>
    | Improve this Doc View Source

    KickPower

    Gets a value indicating a player's kick power.

    Declaration
    public byte KickPower { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    LeadingTeam

    Gets the player's LeadingTeam.

    Declaration
    public LeadingTeam LeadingTeam { get; }
    Property Value
    Type Description
    LeadingTeam
    | Improve this Doc View Source

    Lift

    Gets the current Lift the player is in. Can be null.

    Declaration
    public Lift Lift { get; }
    Property Value
    Type Description
    Lift
    | Improve this Doc View Source

    List

    Gets a list of all Player's on the server.

    Declaration
    public static IReadOnlyCollection<Player> List { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<Player>
    | Improve this Doc View Source

    MaxArtificialHealth

    Gets or sets the player's maximum artificial health.

    Declaration
    public float MaxArtificialHealth { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    MaxHealth

    Gets or sets the player's maximum health.

    Declaration
    public float MaxHealth { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    NetId

    Gets the player's net ID.

    Declaration
    public uint NetId { get; }
    Property Value
    Type Description
    System.UInt32
    | Improve this Doc View Source

    NetworkIdentity

    Gets the player's Mirror.NetworkIdentity.

    Declaration
    public NetworkIdentity NetworkIdentity { get; }
    Property Value
    Type Description
    Mirror.NetworkIdentity
    | Improve this Doc View Source

    Nickname

    Gets the player's nickname.

    Declaration
    public string Nickname { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Ping

    Gets the player's ping.

    Declaration
    public int Ping { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Position

    Gets or sets the player's position.

    Declaration
    public Vector3 Position { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3
    See Also
    Teleport(Vector3)
    Teleport(Object)
    | Improve this Doc View Source

    Preferences

    Gets a System.Collections.Generic.Dictionary<TKey, TValue> which contains all player's preferences.

    Declaration
    public Dictionary<FirearmType, AttachmentIdentifier[]> Preferences { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<FirearmType, AttachmentIdentifier[]>
    | Improve this Doc View Source

    RadioPlayback

    Gets the ReferenceHub's VoiceChat.Playbacks.PersonalRadioPlayback, can be null.

    Declaration
    public PersonalRadioPlayback RadioPlayback { get; }
    Property Value
    Type Description
    VoiceChat.Playbacks.PersonalRadioPlayback
    | Improve this Doc View Source

    RankColor

    Gets or sets the player's rank color.

    Declaration
    public string RankColor { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    RankName

    Gets or sets the player's rank name.

    Declaration
    public string RankName { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    RawUserId

    Gets the player's user id without the authentication.

    Declaration
    public string RawUserId { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ReferenceHub

    Gets the encapsulated ReferenceHub.

    Declaration
    public ReferenceHub ReferenceHub { get; }
    Property Value
    Type Description
    ReferenceHub
    | Improve this Doc View Source

    RelativePosition

    Gets or sets the relative player's position.

    Declaration
    public RelativePosition RelativePosition { get; set; }
    Property Value
    Type Description
    RelativePositioning.RelativePosition
    Remarks

    The value will be default if the player's role is not an FpcRole.

    | Improve this Doc View Source

    RemoteAdminAccess

    Gets a value indicating whether or not the player has Remote Admin access.

    Declaration
    public bool RemoteAdminAccess { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    RemoteAdminPermissions

    Gets or sets a value indicating the actual RA permissions.

    Declaration
    public PlayerPermissions RemoteAdminPermissions { get; set; }
    Property Value
    Type Description
    PlayerPermissions
    | Improve this Doc View Source

    Role

    Gets a Role that is unique to this player and this class. This allows modification of various aspects related to the role solely.

    The type of the Role is different based on the PlayerRoles.RoleTypeId of the player, and casting should be used to modify the role.
    PlayerRoles.RoleTypeId.Spectator = SpectatorRole.
    PlayerRoles.RoleTypeId.Overwatch = OverwatchRole.
    PlayerRoles.RoleTypeId.None = NoneRole.
    PlayerRoles.RoleTypeId.Scp049 = Scp049Role.
    PlayerRoles.RoleTypeId.Scp0492 = Scp0492Role.
    PlayerRoles.RoleTypeId.Scp079 = Scp079Role.
    PlayerRoles.RoleTypeId.Scp096 = Scp096Role.
    PlayerRoles.RoleTypeId.Scp106 = Scp106Role.
    PlayerRoles.RoleTypeId.Scp173 = Scp173Role.
    PlayerRoles.RoleTypeId.Scp3114 = Scp3114Role.
    PlayerRoles.RoleTypeId.Scp939 = Scp939Role.
    If not listed above, the type of Role will be HumanRole.

    If the role object is stored, it may become invalid if the player changes roles. Thus, the IsValid property can be checked. If this property is false, the role should be discarded and this property should be used again to get the new Role. This role is automatically cached until it changes, and it is recommended to use this property directly rather than storing the property yourself.

    Roles and RoleTypeIds can be compared directly. Player.Role == RoleTypeId.Scp079 is valid and will return true if the player is SCP-079. To set the player's role, see Set(RoleTypeId, SpawnReason, RoleSpawnFlags).

    Declaration
    public Role Role { get; }
    Property Value
    Type Description
    Role
    See Also
    Set(PlayerRoles.RoleTypeId, SpawnReason, PlayerRoles.RoleSpawnFlags)
    | Improve this Doc View Source

    RoleManager

    Gets the PlayerRoles.PlayerRoleManager.

    Declaration
    public PlayerRoleManager RoleManager { get; }
    Property Value
    Type Description
    PlayerRoles.PlayerRoleManager
    | Improve this Doc View Source

    Rotation

    Gets or sets the player's rotation.

    Declaration
    public Quaternion Rotation { get; set; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    Returns the direction the player is looking at.

    | Improve this Doc View Source

    Scale

    Gets or sets the player's scale.

    Declaration
    public Vector3 Scale { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3
    | Improve this Doc View Source

    ScpPreferences

    Gets or sets the player's SCP preferences.

    Declaration
    public ScpSpawnPreferences.SpawnPreferences ScpPreferences { get; set; }
    Property Value
    Type Description
    PlayerRoles.RoleAssign.ScpSpawnPreferences.SpawnPreferences
    | Improve this Doc View Source

    Sender

    Gets the player's command sender instance.

    Declaration
    public PlayerCommandSender Sender { get; }
    Property Value
    Type Description
    RemoteAdmin.PlayerCommandSender
    | Improve this Doc View Source

    SessionVariables

    Gets the dictionary of the player's session variables.

    Session variables can be used to save temporary data on players. Data is stored in a System.Collections.Generic.Dictionary<TKey, TValue>. The key of the data is always a System.String, whereas the value can be any System.Object. The data stored in a player's session variables can be accessed by different assemblies; it is recommended to uniquely identify stored data so that it does not conflict with other plugins that may also be using the same name. Data saved with session variables is not being saved on player disconnect. If the data must be saved after the player's disconnects, a database must be used instead.

    Declaration
    public Dictionary<string, object> SessionVariables { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    | Improve this Doc View Source

    Stamina

    Gets or sets the amount of stamina the player has.

    Declaration
    public float Stamina { get; set; }
    Property Value
    Type Description
    System.Single
    Remarks

    This will always be a value between 0-1, 0 representing no stamina and 1 representing maximum stamina.

    | Improve this Doc View Source

    StaminaStat

    Gets the StaminaStat class.

    Declaration
    public StaminaStat StaminaStat { get; }
    Property Value
    Type Description
    PlayerStatsSystem.StaminaStat
    | Improve this Doc View Source

    Transform

    Gets the ReferenceHub's UnityEngine.Transform.

    Declaration
    public Transform Transform { get; }
    Property Value
    Type Description
    UnityEngine.Transform
    | Improve this Doc View Source

    UniqueRole

    Gets or sets a unique custom role that does not adbide to base game for this player. Used in conjunction with CustomRoleFriendlyFireMultiplier.

    Declaration
    public string UniqueRole { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    UnitId

    Gets or sets the player's unit id.

    Declaration
    public byte UnitId { get; set; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    UnitName

    Gets the player's unit name.

    Declaration
    public string UnitName { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    UserId

    Gets the player's user id.

    Declaration
    public string UserId { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    UserIdsCache

    Gets a System.Collections.Generic.Dictionary<TKey, TValue> containing cached Player and their user ids.

    Declaration
    public static Dictionary<string, Player> UserIdsCache { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, Player>
    | Improve this Doc View Source

    Velocity

    Gets the Player's current movement speed.

    Declaration
    public Vector3 Velocity { get; }
    Property Value
    Type Description
    UnityEngine.Vector3
    | Improve this Doc View Source

    VoiceChannel

    Gets or sets the player's voice channel.

    Declaration
    public VoiceChatChannel VoiceChannel { get; set; }
    Property Value
    Type Description
    VoiceChat.VoiceChatChannel
    | Improve this Doc View Source

    VoiceChatMuteFlags

    Gets or sets the player's VoiceChat.VcMuteFlags.

    Declaration
    public VcMuteFlags VoiceChatMuteFlags { get; set; }
    Property Value
    Type Description
    VoiceChat.VcMuteFlags
    | Improve this Doc View Source

    VoiceColor

    Gets the player's voice color.

    Declaration
    public Color VoiceColor { get; }
    Property Value
    Type Description
    UnityEngine.Color
    | Improve this Doc View Source

    VoiceModule

    Gets the ReferenceHub's VoiceModule, can be null.

    Declaration
    public VoiceModuleBase VoiceModule { get; }
    Property Value
    Type Description
    PlayerRoles.Voice.VoiceModuleBase
    | Improve this Doc View Source

    Zone

    Gets the current zone the player is in.

    Declaration
    public ZoneType Zone { get; }
    Property Value
    Type Description
    ZoneType

    Methods

    | Improve this Doc View Source

    AddAhp(Single, Single, Single, Single, Single, Boolean)

    Gives a new PlayerStatsSystem.AhpStat.

    Declaration
    public void AddAhp(float amount, float limit = 75F, float decay = 1.2F, float efficacy = 0.7F, float sustain = 0F, bool persistant = false)
    Parameters
    Type Name Description
    System.Single amount

    The amount to give the player.

    System.Single limit

    The maximum AHP for this stat.

    System.Single decay

    How much value is lost per second.

    System.Single efficacy

    Percent of incoming damage absorbed by this stat.

    System.Single sustain

    The number of seconds to delay the start of the decay.

    System.Boolean persistant

    Whether or not the process is removed when the value hits 0.

    | Improve this Doc View Source

    AddAmmo(AmmoType, UInt16)

    Adds the amount of a specified ammo type to the player's inventory.

    Declaration
    public void AddAmmo(AmmoType ammoType, ushort amount)
    Parameters
    Type Name Description
    AmmoType ammoType

    The AmmoType to be added.

    System.UInt16 amount

    The amount of ammo to be added.

    | Improve this Doc View Source

    AddAmmo(FirearmType, UInt16)

    Adds the amount of a weapon's ammo type to the player's inventory.

    Declaration
    public void AddAmmo(FirearmType weaponType, ushort amount)
    Parameters
    Type Name Description
    FirearmType weaponType

    The ItemType of the weapon.

    System.UInt16 amount

    The amount of ammo to be added.

    | Improve this Doc View Source

    AddComponent(Type, String)

    Declaration
    public EActor AddComponent(Type type, string name = "")
    Parameters
    Type Name Description
    System.Type type
    System.String name
    Returns
    Type Description
    EActor
    | Improve this Doc View Source

    AddComponent<T>(String)

    Declaration
    public T AddComponent<T>(string name = "")
    
        where T : EActor
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AddComponent<T>(Type, String)

    Declaration
    public T AddComponent<T>(Type type, string name = "")
    
        where T : EActor
    Parameters
    Type Name Description
    System.Type type
    System.String name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    AddItem(FirearmType, IEnumerable<AttachmentIdentifier>)

    Adds an firearm of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public Item AddItem(FirearmType firearmType, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    FirearmType firearmType

    The firearm to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    Returns
    Type Description
    Item

    The Item given to the player.

    | Improve this Doc View Source

    AddItem(FirearmType, Int32, IEnumerable<AttachmentIdentifier>)

    Adds the amount of firearms of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public IEnumerable<Item> AddItem(FirearmType firearmType, int amount, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    FirearmType firearmType

    The item to be added.

    System.Int32 amount

    The amount of items to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddItem(Firearm, IEnumerable<AttachmentIdentifier>)

    Adds an item to the player's inventory.

    Declaration
    public void AddItem(Firearm item, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    Firearm item

    The item to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    | Improve this Doc View Source

    AddItem(Firearm, Int32, IEnumerable<AttachmentIdentifier>)

    Adds the amount of items to the player's inventory.

    Declaration
    [Obsolete("Removed this method can't be functional")]
    public void AddItem(Firearm firearm, int amount, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    Firearm firearm

    The firearm to be added.

    System.Int32 amount

    The amount of items to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    | Improve this Doc View Source

    AddItem(Item)

    Adds an item to the player's inventory.

    Declaration
    public void AddItem(Item item)
    Parameters
    Type Name Description
    Item item

    The item to be added.

    | Improve this Doc View Source

    AddItem(Item, Int32)

    Adds the amount of items to the player's inventory.

    Declaration
    [Obsolete("Removed this method can't be functional")]
    public void AddItem(Item item, int amount)
    Parameters
    Type Name Description
    Item item

    The item to be added.

    System.Int32 amount

    The amount of items to be added.

    | Improve this Doc View Source

    AddItem(FirearmPickup, IEnumerable<AttachmentIdentifier>)

    Adds an item to the player's inventory.

    Declaration
    public Item AddItem(FirearmPickup pickup, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    FirearmPickup pickup

    The FirearmPickup of the item to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to Pickup of the item.

    Returns
    Type Description
    Item

    The Item that was added.

    | Improve this Doc View Source

    AddItem(Pickup)

    Adds an item to the player's inventory.

    Declaration
    public Item AddItem(Pickup pickup)
    Parameters
    Type Name Description
    Pickup pickup

    The Pickup of the item to be added.

    Returns
    Type Description
    Item

    The Item that was added.

    | Improve this Doc View Source

    AddItem(ItemBase, Item)

    Adds an item to the player's inventory.

    Declaration
    public Item AddItem(ItemBase itemBase, Item item = null)
    Parameters
    Type Name Description
    InventorySystem.Items.ItemBase itemBase

    The item to be added.

    Item item

    The Item object of the item.

    Returns
    Type Description
    Item

    The Item that was added.

    | Improve this Doc View Source

    AddItem(ItemType)

    Adds an item of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public Item AddItem(ItemType itemType)
    Parameters
    Type Name Description
    ItemType itemType

    The item to be added.

    Returns
    Type Description
    Item

    The Item given to the player.

    | Improve this Doc View Source

    AddItem(ItemType, IEnumerable<AttachmentIdentifier>)

    Adds an item of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    [Obsolete("Use AddItem(ItemType) or AddItem(FirearmType, IEnumerable<AttachmentIdentifier>)", true)]
    public Item AddItem(ItemType itemType, IEnumerable<AttachmentIdentifier> identifiers = null)
    Parameters
    Type Name Description
    ItemType itemType

    The item to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    Returns
    Type Description
    Item

    The Item given to the player.

    | Improve this Doc View Source

    AddItem(ItemType, Int32)

    Adds the amount of items of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public IEnumerable<Item> AddItem(ItemType itemType, int amount)
    Parameters
    Type Name Description
    ItemType itemType

    The item to be added.

    System.Int32 amount

    The amount of items to be added.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddItem(ItemType, Int32, IEnumerable<AttachmentIdentifier>)

    Adds the amount of items of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    [Obsolete("Use AddItem(ItemType, int) or AddItem(FirearmType, int, IEnumerable<AttachmentIdentifier>)", true)]
    public IEnumerable<Item> AddItem(ItemType itemType, int amount, IEnumerable<AttachmentIdentifier> identifiers)
    Parameters
    Type Name Description
    ItemType itemType

    The item to be added.

    System.Int32 amount

    The amount of items to be added.

    System.Collections.Generic.IEnumerable<AttachmentIdentifier> identifiers

    The attachments to be added to the item.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddItem(Dictionary<FirearmType, IEnumerable<AttachmentIdentifier>>)

    Adds the list of items of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public IEnumerable<Item> AddItem(Dictionary<FirearmType, IEnumerable<AttachmentIdentifier>> items)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<FirearmType, System.Collections.Generic.IEnumerable<AttachmentIdentifier>> items

    The System.Collections.Generic.Dictionary<TKey, TValue> of ItemType and System.Collections.Generic.IEnumerable<T> of AttachmentIdentifier to be added.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddItem(Dictionary<Firearm, IEnumerable<AttachmentIdentifier>>)

    Adds the list of items to the player's inventory.

    Declaration
    public void AddItem(Dictionary<Firearm, IEnumerable<AttachmentIdentifier>> firearms)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<Firearm, System.Collections.Generic.IEnumerable<AttachmentIdentifier>> firearms

    The System.Collections.Generic.Dictionary<TKey, TValue> of Firearm and System.Collections.Generic.IEnumerable<T> of AttachmentIdentifier to be added.

    | Improve this Doc View Source

    AddItem(Dictionary<ItemType, IEnumerable<AttachmentIdentifier>>)

    Adds the list of items of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    [Obsolete("Use AddItem(Dictionary<FirearmType, IEnumerable<AttachmentIdentifier>>) instead of this", true)]
    public IEnumerable<Item> AddItem(Dictionary<ItemType, IEnumerable<AttachmentIdentifier>> items)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<ItemType, System.Collections.Generic.IEnumerable<AttachmentIdentifier>> items

    The System.Collections.Generic.Dictionary<TKey, TValue> of ItemType and System.Collections.Generic.IEnumerable<T> of AttachmentIdentifier to be added.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddItem(IEnumerable<Item>)

    Adds the list of items to the player's inventory.

    Declaration
    public void AddItem(IEnumerable<Item> items)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Item> items

    The list of items to be added.

    | Improve this Doc View Source

    AddItem(IEnumerable<ItemType>)

    Adds the list of items of the specified type with default durability(ammo/charge) and no mods to the player's inventory.

    Declaration
    public IEnumerable<Item> AddItem(IEnumerable<ItemType> items)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ItemType> items

    The list of items to be added.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Item>

    An System.Collections.Generic.IEnumerable<T> containing the items given.

    | Improve this Doc View Source

    AddReservedSlot(String)

    Adds a player's UserId to the list of reserved slots.

    Declaration
    public static bool AddReservedSlot(string userId)
    Parameters
    Type Name Description
    System.String userId

    The UserId of the player to add.

    Returns
    Type Description
    System.Boolean

    true if the slot was successfully added, or false if the provided UserId already has a reserved slot.

    Remarks

    This method does not permanently give a user a reserved slot. The slot will be removed if the reserved slots are reloaded.

    See Also
    GiveReservedSlot()
    | Improve this Doc View Source

    AddReservedSlot(String, Boolean)

    Adds a player's UserId to the list of reserved slots.

    Declaration
    public static bool AddReservedSlot(string userId, bool isPermanent)
    Parameters
    Type Name Description
    System.String userId

    The UserId of the player to add.

    System.Boolean isPermanent

    Whether or not to add a langword_csharp_userId permanently. It will write a langword_csharp_userId to UserIDReservedSlots.txt file.

    Returns
    Type Description
    System.Boolean

    true if the slot was successfully added, or false if the provided UserId already has a reserved slot.

    See Also
    GiveReservedSlot(Boolean)
    | Improve this Doc View Source

    AddToWhitelist(String, Boolean)

    Adds a player's UserId to the whitelist.

    Declaration
    public static bool AddToWhitelist(string userId, bool isPermanent)
    Parameters
    Type Name Description
    System.String userId

    The UserId of the player to add.

    System.Boolean isPermanent

    Whether or not to add a langword_csharp_userId permanently. It will write a langword_csharp_userId to UserIDWhitelist.txt file.

    Returns
    Type Description
    System.Boolean

    true if the record was successfully added, or false if the provided UserId already is in whitelist.

    See Also
    GrantWhitelist(Boolean)
    | Improve this Doc View Source

    ApplyRandomEffect(EffectCategory, Byte, Single, Boolean)

    Enables a random EffectType on the player.

    Declaration
    public EffectType ApplyRandomEffect(EffectCategory category, byte intensity, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    EffectCategory category

    An optional category to filter the applied effect. Set to None for any effect.

    System.Byte intensity

    The intensity of the effect will be active for.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    EffectType

    A EffectType that was given to the player.

    | Improve this Doc View Source

    ApplyRandomEffect(EffectCategory, Single, Boolean)

    Enables a random EffectType on the player.

    Declaration
    public EffectType ApplyRandomEffect(EffectCategory category = EffectCategory.None, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    EffectCategory category

    An optional category to filter the applied effect. Set to None for any effect.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    EffectType

    A EffectType that was given to the player.

    | Improve this Doc View Source

    Ban(Int32, String, Player)

    Bans the player.

    Declaration
    public void Ban(int duration, string reason, Player issuer = null)
    Parameters
    Type Name Description
    System.Int32 duration

    The ban duration, in seconds.

    System.String reason

    The ban reason.

    Player issuer

    The ban issuer.

    | Improve this Doc View Source

    Ban(TimeSpan, String, Player)

    Bans the player.

    Declaration
    public void Ban(TimeSpan duration, string reason, Player issuer = null)
    Parameters
    Type Name Description
    System.TimeSpan duration

    The length of time to ban.

    System.String reason

    The ban reason.

    Player issuer

    The ban issuer.

    | Improve this Doc View Source

    BlinkTag()

    Blink the player's tag.

    Declaration
    public IEnumerator<float> BlinkTag()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Single>

    Used to wait.

    | Improve this Doc View Source

    Broadcast(Broadcast, Boolean)

    Broadcasts the given Broadcast to the player.

    Declaration
    public void Broadcast(Broadcast broadcast, bool shouldClearPrevious = false)
    Parameters
    Type Name Description
    Broadcast broadcast

    The Broadcast to be broadcasted.

    System.Boolean shouldClearPrevious

    Clears all player's broadcasts before sending the new one.

    | Improve this Doc View Source

    Broadcast(UInt16, String, Broadcast.BroadcastFlags, Boolean)

    Shows a broadcast to the player. Doesn't get logged to the console and can be monospaced.

    Declaration
    public void Broadcast(ushort duration, string message, Broadcast.BroadcastFlags type = Broadcast.BroadcastFlags.Normal, bool shouldClearPrevious = false)
    Parameters
    Type Name Description
    System.UInt16 duration

    The broadcast duration.

    System.String message

    The message to be broadcasted.

    Broadcast.BroadcastFlags type

    The broadcast type.

    System.Boolean shouldClearPrevious

    Clears all player's broadcasts before sending the new one.

    | Improve this Doc View Source

    ChangeEffectIntensity(EffectType, Byte, Single)

    Changes the intensity of a CustomPlayerEffects.StatusEffectBase.

    Declaration
    public void ChangeEffectIntensity(EffectType type, byte intensity, float duration = 0F)
    Parameters
    Type Name Description
    EffectType type

    The EffectType to change.

    System.Byte intensity

    The new intensity to use.

    System.Single duration

    The new duration to add to the effect.

    | Improve this Doc View Source

    ChangeEffectIntensity(String, Byte, Single)

    Changes the intensity of a CustomPlayerEffects.StatusEffectBase.

    Declaration
    public void ChangeEffectIntensity(string effectName, byte intensity, float duration = 0F)
    Parameters
    Type Name Description
    System.String effectName

    The name of the CustomPlayerEffects.StatusEffectBase to enable.

    System.Byte intensity

    The intensity of the effect.

    System.Single duration

    The new length of the effect. Defaults to infinite length.

    | Improve this Doc View Source

    ChangeEffectIntensity<T>(Byte, Single)

    Changes the intensity of a CustomPlayerEffects.StatusEffectBase.

    Declaration
    public void ChangeEffectIntensity<T>(byte intensity, float duration = 0F)
    
        where T : StatusEffectBase
    Parameters
    Type Name Description
    System.Byte intensity

    The intensity of the effect.

    System.Single duration

    The new duration to add to the effect.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to change the intensity of.

    | Improve this Doc View Source

    ClearAmmo()

    Clears all ammo in the inventory.

    Declaration
    public void ClearAmmo()
    See Also
    ResetInventory(IEnumerable<Item>)
    SetAmmo(AmmoType, UInt16)
    DropItems()
    | Improve this Doc View Source

    ClearBroadcasts()

    Clears the player's brodcast. Doesn't get logged to the console.

    Declaration
    public void ClearBroadcasts()
    | Improve this Doc View Source

    ClearInventory(Boolean)

    Clears the player's inventory, including all ammo and items.

    Declaration
    public void ClearInventory(bool destroy = true)
    Parameters
    Type Name Description
    System.Boolean destroy

    Whether or not to fully destroy the old items.

    See Also
    ResetInventory(IEnumerable<Item>)
    ResetInventory(IEnumerable<ItemType>)
    DropItems()
    | Improve this Doc View Source

    ClearItems(Boolean)

    Clears the player's items.

    Declaration
    public void ClearItems(bool destroy = true)
    Parameters
    Type Name Description
    System.Boolean destroy

    Whether or not to fully destroy the old items.

    See Also
    ResetInventory(IEnumerable<Item>)
    ResetInventory(IEnumerable<ItemType>)
    DropItems()
    | Improve this Doc View Source

    CountItem(ProjectileType)

    Counts how many items of a certain ProjectileType a player has.

    Declaration
    public int CountItem(ProjectileType grenadeType)
    Parameters
    Type Name Description
    ProjectileType grenadeType

    The ProjectileType to search for.

    Returns
    Type Description
    System.Int32

    How many items of that ProjectileType the player has.

    See Also
    CountItem(ItemType)
    | Improve this Doc View Source

    CountItem(ItemCategory)

    Counts how many items of a certain ItemCategory a player has.

    Declaration
    public int CountItem(ItemCategory category)
    Parameters
    Type Name Description
    ItemCategory category

    The category to search for.

    Returns
    Type Description
    System.Int32

    How many items of that ItemCategory the player has.

    See Also
    CountItem(ItemType)
    | Improve this Doc View Source

    CountItem(ItemType)

    Counts how many items of a certain ItemType a player has.

    Declaration
    public int CountItem(ItemType item)
    Parameters
    Type Name Description
    ItemType item

    The item to search for.

    Returns
    Type Description
    System.Int32

    How many items of that ItemType the player has.

    Remarks

    For counting ammo, see GetAmmo(AmmoType).

    See Also
    GetAmmo(AmmoType)
    CountItem(ItemCategory)
    | Improve this Doc View Source

    DisableAllEffects()

    Disables all currently active CustomPlayerEffects.StatusEffectBase.

    Declaration
    public void DisableAllEffects()
    See Also
    DisableEffects(IEnumerable<EffectType>)
    | Improve this Doc View Source

    DisableAllEffects(EffectCategory)

    Disables all currently active CustomPlayerEffects.StatusEffectBase.

    Declaration
    public void DisableAllEffects(EffectCategory category)
    Parameters
    Type Name Description
    EffectCategory category

    A category to filter the disabled effects.

    See Also
    DisableAllEffects()
    | Improve this Doc View Source

    DisableEffect(EffectType)

    Disables a specific status effect on the player.

    Declaration
    public void DisableEffect(EffectType effect)
    Parameters
    Type Name Description
    EffectType effect

    The EffectType to disable.

    | Improve this Doc View Source

    DisableEffect<T>()

    Disables a specific CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public void DisableEffect<T>()
    
        where T : StatusEffectBase
    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to disable.

    | Improve this Doc View Source

    DisableEffects(IEnumerable<EffectType>)

    Disables a System.Collections.Generic.IEnumerable<T> of EffectType on the player.

    Declaration
    public void DisableEffects(IEnumerable<EffectType> effects)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<EffectType> effects

    The System.Collections.Generic.IEnumerable<T> of EffectType to disable.

    | Improve this Doc View Source

    Disconnect(String)

    Disconnects the player.

    Declaration
    public void Disconnect(string reason = null)
    Parameters
    Type Name Description
    System.String reason

    The disconnection reason.

    | Improve this Doc View Source

    DropAmmo(AmmoType, UInt16, Boolean)

    Drops a specific AmmoType out of the player's inventory.

    Declaration
    public bool DropAmmo(AmmoType ammoType, ushort amount, bool checkMinimals = false)
    Parameters
    Type Name Description
    AmmoType ammoType

    The AmmoType that will be dropped.

    System.UInt16 amount

    The amount of ammo that will be dropped.

    System.Boolean checkMinimals

    Whether or not ammo limits will be taken into consideration.

    Returns
    Type Description
    System.Boolean

    true if ammo was dropped; otherwise, false.

    | Improve this Doc View Source

    DropHeldItem()

    Drops the held item. Will not do anything if the player is not holding an item.

    Declaration
    public Pickup DropHeldItem()
    Returns
    Type Description
    Pickup

    Dropped item's Pickup.

    See Also
    CurrentItem
    | Improve this Doc View Source

    DropHeldItem(Boolean)

    Drops the held item. Will not do anything if the player is not holding an item.

    Declaration
    public void DropHeldItem(bool isThrown = false)
    Parameters
    Type Name Description
    System.Boolean isThrown

    Is the item Thrown?.

    | Improve this Doc View Source

    DropItem(Item)

    Drops an item from the player's inventory.

    Declaration
    public Pickup DropItem(Item item)
    Parameters
    Type Name Description
    Item item

    The Item to be dropped.

    Returns
    Type Description
    Pickup

    dropped Pickup.

    | Improve this Doc View Source

    DropItem(Item, Boolean)

    Drops an item from the player's inventory.

    Declaration
    public void DropItem(Item item, bool isThrown = false)
    Parameters
    Type Name Description
    Item item

    The Item to be dropped.

    System.Boolean isThrown

    Is the item Thrown?.

    | Improve this Doc View Source

    DropItems()

    Drops all items in the player's inventory, including all ammo and items.

    Declaration
    public void DropItems()
    See Also
    ClearInventory(Boolean)
    | Improve this Doc View Source

    EnableEffect(StatusEffectBase, Byte, Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public bool EnableEffect(StatusEffectBase statusEffect, byte intensity, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    CustomPlayerEffects.StatusEffectBase statusEffect

    The name of the CustomPlayerEffects.StatusEffectBase to enable.

    System.Byte intensity

    The intensity of the effect will be active for.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the effect was valid and successfully enabled.

    | Improve this Doc View Source

    EnableEffect(StatusEffectBase, Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public bool EnableEffect(StatusEffectBase statusEffect, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    CustomPlayerEffects.StatusEffectBase statusEffect

    The name of the CustomPlayerEffects.StatusEffectBase to enable.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the effect was valid and successfully enabled.

    | Improve this Doc View Source

    EnableEffect(EffectType, Byte, Single, Boolean)

    Enables a status effect on the player.

    Declaration
    public bool EnableEffect(EffectType type, byte intensity, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    EffectType type

    The EffectType to enable.

    System.Byte intensity

    The intensity of the effect will be active for.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    System.Boolean

    return if the effect has been Enable.

    | Improve this Doc View Source

    EnableEffect(EffectType, Single, Boolean)

    Enables a status effect on the player.

    Declaration
    public void EnableEffect(EffectType type, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    EffectType type

    The EffectType to enable.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    | Improve this Doc View Source

    EnableEffect(Effect)

    Enables a status effect on the player.

    Declaration
    [Obsolete("Use SyncEffect(Effect) instead of this")]
    public void EnableEffect(Effect effect)
    Parameters
    Type Name Description
    Effect effect

    The Effect to enable.

    | Improve this Doc View Source

    EnableEffect(String, Byte, Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public StatusEffectBase EnableEffect(string effectName, byte intensity, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    System.String effectName

    The name of the CustomPlayerEffects.StatusEffectBase to enable.

    System.Byte intensity

    The intensity of the effect will be active for.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    CustomPlayerEffects.StatusEffectBase

    The CustomPlayerEffects.StatusEffectBase instance of the activated effect.

    | Improve this Doc View Source

    EnableEffect(String, Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public StatusEffectBase EnableEffect(string effectName, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    System.String effectName

    The name of the CustomPlayerEffects.StatusEffectBase to enable.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    CustomPlayerEffects.StatusEffectBase

    The CustomPlayerEffects.StatusEffectBase instance of the activated effect.

    | Improve this Doc View Source

    EnableEffect<T>(Byte, Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public bool EnableEffect<T>(byte intensity, float duration = 0F, bool addDurationIfActive = false)
    
        where T : StatusEffectBase
    Parameters
    Type Name Description
    System.Byte intensity

    The intensity of the effect will be active for.

    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the effect was valid and successfully enabled.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to enable.

    | Improve this Doc View Source

    EnableEffect<T>(Single, Boolean)

    Enables a CustomPlayerEffects.StatusEffectBase on the player.

    Declaration
    public bool EnableEffect<T>(float duration = 0F, bool addDurationIfActive = false)
    
        where T : StatusEffectBase
    Parameters
    Type Name Description
    System.Single duration

    The amount of time the effect will be active for.

    System.Boolean addDurationIfActive

    If the effect is already active, setting to true will add this duration onto the effect.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the effect was valid and successfully enabled.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to enable.

    | Improve this Doc View Source

    EnableEffects(IEnumerable<EffectType>, Single, Boolean)

    Enables a System.Collections.Generic.IEnumerable<T> of EffectType on the player.

    Declaration
    public void EnableEffects(IEnumerable<EffectType> types, float duration = 0F, bool addDurationIfActive = false)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<EffectType> types

    The System.Collections.Generic.IEnumerable<T> of EffectType to enable.

    System.Single duration

    The amount of time the effects will be active for.

    System.Boolean addDurationIfActive

    If an effect is already active, setting to true will add this duration onto the effect.

    | Improve this Doc View Source

    EnableEffects(IEnumerable<Effect>)

    Enables a System.Collections.Generic.IEnumerable<T> of Effect on the player.

    Declaration
    [Obsolete("Use SyncEffects(IEnumerable<Effect>) instead of this")]
    public void EnableEffects(IEnumerable<Effect> effects)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Effect> effects

    The System.Collections.Generic.IEnumerable<T> of Effect to enable.

    | Improve this Doc View Source

    Explode()

    Explode the player.

    Declaration
    public void Explode()
    | Improve this Doc View Source

    Explode(ProjectileType, Player)

    Explode the player.

    Declaration
    public void Explode(ProjectileType projectileType, Player attacker = null)
    Parameters
    Type Name Description
    ProjectileType projectileType

    The projectile that will create the explosion.

    Player attacker

    The Player that will causing the explosion.

    | Improve this Doc View Source

    ExplodeEffect(ProjectileType)

    Spawn projectile effect on the player.

    Declaration
    public void ExplodeEffect(ProjectileType projectileType)
    Parameters
    Type Name Description
    ProjectileType projectileType

    The projectile that will create the effect.

    | Improve this Doc View Source

    Finalize()

    Finalizes an instance of the Player class.

    Declaration
    protected void Finalize()
    | Improve this Doc View Source

    Get(CommandSender)

    Gets the Player belonging to the CommandSender, if any.

    Declaration
    public static Player Get(CommandSender sender)
    Parameters
    Type Name Description
    CommandSender sender

    The command sender.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(ICommandSender)

    Gets the Player belonging to the CommandSystem.ICommandSender, if any.

    Declaration
    public static Player Get(ICommandSender sender)
    Parameters
    Type Name Description
    CommandSystem.ICommandSender sender

    The command sender.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(Side)

    Gets a Player System.Collections.Generic.IEnumerable<T> filtered by side. Can be empty.

    Declaration
    public static IEnumerable<Player> Get(Side side)
    Parameters
    Type Name Description
    Side side

    The players' side.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Player>

    The filtered System.Collections.Generic.IEnumerable<T>.

    | Improve this Doc View Source

    Get(Footprint)

    Gets the Player belonging to the Footprinting.Footprint, if any.

    Declaration
    public static Player Get(Footprint footprint)
    Parameters
    Type Name Description
    Footprinting.Footprint footprint

    The Footprint.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(NetworkConnection)

    Gets the Player belonging to a specific Mirror.NetworkConnection, if any.

    Declaration
    public static Player Get(NetworkConnection conn)
    Parameters
    Type Name Description
    Mirror.NetworkConnection conn

    The player's Mirror.NetworkConnection.

    Returns
    Type Description
    Player

    The Player owning the Mirror.NetworkConnection, or null if not found.

    | Improve this Doc View Source

    Get(NetworkIdentity)

    Gets the Player belonging to a specific Mirror.NetworkIdentity, if any.

    Declaration
    public static Player Get(NetworkIdentity netIdentity)
    Parameters
    Type Name Description
    Mirror.NetworkIdentity netIdentity

    The player's Mirror.NetworkIdentity.

    Returns
    Type Description
    Player

    The Player owning the Mirror.NetworkIdentity, or null if not found.

    | Improve this Doc View Source

    Get(RoleTypeId)

    Gets a Player System.Collections.Generic.IEnumerable<T> filtered by role. Can be empty.

    Declaration
    public static IEnumerable<Player> Get(RoleTypeId role)
    Parameters
    Type Name Description
    PlayerRoles.RoleTypeId role

    The players' role.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Player>

    The filtered System.Collections.Generic.IEnumerable<T>.

    | Improve this Doc View Source

    Get(Team)

    Gets a Player System.Collections.Generic.IEnumerable<T> filtered by team. Can be empty.

    Declaration
    public static IEnumerable<Player> Get(Team team)
    Parameters
    Type Name Description
    PlayerRoles.Team team

    The players' team.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Player>

    The filtered System.Collections.Generic.IEnumerable<T>.

    | Improve this Doc View Source

    Get(Player)

    Gets the Player from NwPluginAPI class.

    Declaration
    public static Player Get(Player apiPlayer)
    Parameters
    Type Name Description
    PluginAPI.Core.Player apiPlayer

    The PluginAPI.Core.Player class.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(ReferenceHub)

    Gets the Player belonging to the ReferenceHub, if any.

    Declaration
    public static Player Get(ReferenceHub referenceHub)
    Parameters
    Type Name Description
    ReferenceHub referenceHub

    The player's ReferenceHub.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(Func<Player, Boolean>)

    Gets a System.Collections.Generic.IEnumerable<T> of Player filtered based on a predicate.

    Declaration
    public static IEnumerable<Player> Get(Func<Player, bool> predicate)
    Parameters
    Type Name Description
    System.Func<Player, System.Boolean> predicate

    The condition to satisfy.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Player>

    A System.Collections.Generic.IEnumerable<T> of Player which contains elements that satisfy the condition.

    | Improve this Doc View Source

    Get(Int32)

    Gets the player belonging to the specified id.

    Declaration
    public static Player Get(int id)
    Parameters
    Type Name Description
    System.Int32 id

    The player id.

    Returns
    Type Description
    Player

    Returns the player found or null if not found.

    | Improve this Doc View Source

    Get(String)

    Gets the Player by identifier.

    Declaration
    public static Player Get(string args)
    Parameters
    Type Name Description
    System.String args

    The player's nickname, ID, steamID64 or Discord ID.

    Returns
    Type Description
    Player

    Returns the player found or null if not found.

    | Improve this Doc View Source

    Get(UInt32)

    Gets the Player belonging to a specific netId, if any.

    Declaration
    public static Player Get(uint netId)
    Parameters
    Type Name Description
    System.UInt32 netId

    The player's Mirror.NetworkIdentity.netId.

    Returns
    Type Description
    Player

    The Player owning the netId, or null if not found.

    | Improve this Doc View Source

    Get(Collider)

    Gets the Player belonging to the UnityEngine.Collider, if any.

    Declaration
    public static Player Get(Collider collider)
    Parameters
    Type Name Description
    UnityEngine.Collider collider

    UnityEngine.Collider.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    Get(GameObject)

    Gets the Player belonging to the UnityEngine.GameObject, if any.

    Declaration
    public static Player Get(GameObject gameObject)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    The player's UnityEngine.GameObject.

    Returns
    Type Description
    Player

    A Player or null if not found.

    | Improve this Doc View Source

    GetAmmo(AmmoType)

    Gets the ammo count of a specified ammo type in a player's inventory.

    Declaration
    public ushort GetAmmo(AmmoType ammoType)
    Parameters
    Type Name Description
    AmmoType ammoType

    The AmmoType to be searched for in the player's inventory.

    Returns
    Type Description
    System.UInt16

    The specified ammo count.

    | Improve this Doc View Source

    GetAmmoLimit(AmmoType)

    Gets the maximum amount of ammo the player can hold, given the ammo AmmoType. This method factors in the armor the player is wearing, as well as server configuration. For the maximum amount of ammo that can be given regardless of worn armor and server configuration, see ServerConfigSynchronizer.AmmoLimit.

    Declaration
    public int GetAmmoLimit(AmmoType type)
    Parameters
    Type Name Description
    AmmoType type

    The AmmoType of the ammo to check.

    Returns
    Type Description
    System.Int32

    The maximum amount of ammo this player can carry. Guaranteed to be between 0 and ServerConfigSynchronizer.AmmoLimit.

    | Improve this Doc View Source

    GetCategoryLimit(ItemCategory)

    Gets the maximum amount of an ItemCategory the player can hold, based on the armor the player is wearing, as well as server configuration.

    Declaration
    public int GetCategoryLimit(ItemCategory category)
    Parameters
    Type Name Description
    ItemCategory category

    The ItemCategory to check.

    Returns
    Type Description
    System.Int32

    The maximum amount of items in the category that the player can hold.

    | Improve this Doc View Source

    GetComponent(Type)

    Declaration
    public EActor GetComponent(Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    EActor
    | Improve this Doc View Source

    GetComponent<T>()

    Declaration
    public T GetComponent<T>()
    
        where T : EActor
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetComponent<T>(Type)

    Declaration
    public T GetComponent<T>(Type type)
    
        where T : EActor
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetCooldownItem(ItemType)

    Get the time cooldown on this ItemType.

    Declaration
    public float GetCooldownItem(ItemType itemType)
    Parameters
    Type Name Description
    ItemType itemType

    The itemtypes to choose for getting cooldown.

    Returns
    Type Description
    System.Single

    Return the time in seconds of the cooldowns.

    | Improve this Doc View Source

    GetEffect(EffectType)

    Gets an instance of CustomPlayerEffects.StatusEffectBase by EffectType.

    Declaration
    public StatusEffectBase GetEffect(EffectType effectType)
    Parameters
    Type Name Description
    EffectType effectType

    The EffectType.

    Returns
    Type Description
    CustomPlayerEffects.StatusEffectBase

    The CustomPlayerEffects.StatusEffectBase.

    | Improve this Doc View Source

    GetEffectIntensity<T>()

    Gets a System.Byte indicating the intensity of the given CustomPlayerEffects.StatusEffectBase.

    Declaration
    public byte GetEffectIntensity<T>()
    
        where T : StatusEffectBase
    Returns
    Type Description
    System.Byte

    The intensity of the effect.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to check.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown if the given type is not a valid CustomPlayerEffects.StatusEffectBase.

    | Improve this Doc View Source

    GetModule<T>()

    Gets a PlayerStatsSystem.StatBase module from the player's PlayerStatsSystem.PlayerStats component.

    Declaration
    public T GetModule<T>()
    
        where T : StatBase
    Returns
    Type Description
    T

    The T module that was requested.

    Type Parameters
    Name Description
    T

    The returned object type.

    | Improve this Doc View Source

    GetNearCameras(Single)

    Declaration
    public IEnumerable<Camera> GetNearCameras(float toleration = 15F)
    Parameters
    Type Name Description
    System.Single toleration
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Camera>
    | Improve this Doc View Source

    GetScpPreference(RoleTypeId)

    Gets a user's SCP preference.

    Declaration
    public int GetScpPreference(RoleTypeId roleType)
    Parameters
    Type Name Description
    PlayerRoles.RoleTypeId roleType

    The SCP RoleType.

    Returns
    Type Description
    System.Int32

    A value from -5 to 5, representing a player's preference to play as the provided SCP. Will return 0 for invalid SCPs.

    | Improve this Doc View Source

    GiveReservedSlot()

    Adds the player's UserId to the list of reserved slots.

    Declaration
    public bool GiveReservedSlot()
    Returns
    Type Description
    System.Boolean

    true if the slot was successfully added, or false if the player already has a reserved slot.

    Remarks

    This method does not permanently give a user a reserved slot. The slot will be removed if the reserved slots are reloaded.

    See Also
    AddReservedSlot(String)
    | Improve this Doc View Source

    GiveReservedSlot(Boolean)

    Adds a player's UserId to the list of reserved slots.

    Declaration
    public bool GiveReservedSlot(bool isPermanent)
    Parameters
    Type Name Description
    System.Boolean isPermanent

    Whether or not to add a player's UserId permanently. It will write a player's UserId to UserIDReservedSlots.txt file.

    Returns
    Type Description
    System.Boolean

    true if the slot was successfully added, or false if the provided UserId already has a reserved slot.

    See Also
    AddReservedSlot(String, Boolean)
    | Improve this Doc View Source

    GrantWhitelist(Boolean)

    Adds a player's UserId to the whitelist.

    Declaration
    public bool GrantWhitelist(bool isPermanent)
    Parameters
    Type Name Description
    System.Boolean isPermanent

    Whether or not to add a player's UserId permanently. It will write a player's UserId to UserIDWhitelist.txt file.

    Returns
    Type Description
    System.Boolean

    true if the record was successfully added, or false if the provided UserId already is in whitelist.

    See Also
    AddToWhitelist(String, Boolean)
    | Improve this Doc View Source

    Handcuff()

    Handcuff the player as administrator.

    Declaration
    public void Handcuff()
    | Improve this Doc View Source

    Handcuff(Player)

    Handcuff the player.

    Declaration
    public void Handcuff(Player cuffer)
    Parameters
    Type Name Description
    Player cuffer

    The cuffer player.

    | Improve this Doc View Source

    HasComponent(Type, Boolean)

    Declaration
    public bool HasComponent(Type type, bool depthInheritance = false)
    Parameters
    Type Name Description
    System.Type type
    System.Boolean depthInheritance
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasComponent<T>(Boolean)

    Declaration
    public bool HasComponent<T>(bool depthInheritance = false)
    Parameters
    Type Name Description
    System.Boolean depthInheritance
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    HasItem(Item)

    Indicates whether or not the player has an item.

    Declaration
    public bool HasItem(Item item)
    Parameters
    Type Name Description
    Item item

    The item to search for.

    Returns
    Type Description
    System.Boolean

    true, if the player has it; otherwise, false.

    | Improve this Doc View Source

    HasItem(ItemType)

    Indicates whether or not the player has an item type.

    Declaration
    public bool HasItem(ItemType type)
    Parameters
    Type Name Description
    ItemType type

    The type to search for.

    Returns
    Type Description
    System.Boolean

    true, if the player has it; otherwise, false.

    | Improve this Doc View Source

    Heal(Single, Boolean)

    Heals the player.

    Declaration
    public void Heal(float amount, bool overrideMaxHealth = false)
    Parameters
    Type Name Description
    System.Single amount

    The amount of health to heal.

    System.Boolean overrideMaxHealth

    Whether or not healing should exceed their max health.

    | Improve this Doc View Source

    Hurt(Player, Single, DamageType, DamageHandlerBase.CassieAnnouncement)

    Hurts the player.

    Declaration
    public void Hurt(Player attacker, float amount, DamageType damageType = DamageType.Unknown, DamageHandlerBase.CassieAnnouncement cassieAnnouncement = null)
    Parameters
    Type Name Description
    Player attacker

    The Player attacking player.

    System.Single amount

    The langword_csharp_float amount of damage to deal.

    DamageType damageType

    The DamageType of the damage dealt.

    DamageHandlerBase.CassieAnnouncement cassieAnnouncement

    The DamageHandlerBase.CassieAnnouncement cassie announcement to make if the damage kills the player.

    | Improve this Doc View Source

    Hurt(Player, Single, DamageType, DamageHandlerBase.CassieAnnouncement, String)

    Hurts the player.

    Declaration
    public void Hurt(Player attacker, float amount, DamageType damageType = DamageType.Unknown, DamageHandlerBase.CassieAnnouncement cassieAnnouncement = null, string deathText = null)
    Parameters
    Type Name Description
    Player attacker

    The Player attacking player.

    System.Single amount

    The langword_csharp_float amount of damage to deal.

    DamageType damageType

    The DamageType of the damage dealt.

    DamageHandlerBase.CassieAnnouncement cassieAnnouncement

    The DamageHandlerBase.CassieAnnouncement cassie announcement to make if the damage kills the player.

    System.String deathText

    The langword_csharp_string death text to appear on Player screen.

    | Improve this Doc View Source

    Hurt(Player, Single, Vector3, Int32)

    Hurts the player.

    Declaration
    public void Hurt(Player attacker, float damage, Vector3 force = default(Vector3), int armorPenetration = 0)
    Parameters
    Type Name Description
    Player attacker

    The Player attacking player.

    System.Single damage

    The langword_csharp_float amount of damage to deal.

    UnityEngine.Vector3 force

    The throw force.

    System.Int32 armorPenetration

    The armor penetration amount.

    | Improve this Doc View Source

    Hurt(DamageHandlerBase)

    Hurts the player.

    Declaration
    public void Hurt(DamageHandlerBase damageHandlerBase)
    Parameters
    Type Name Description
    PlayerStatsSystem.DamageHandlerBase damageHandlerBase

    The PlayerStatsSystem.DamageHandlerBase used to deal damage.

    | Improve this Doc View Source

    Hurt(Single, DamageType, String)

    Hurts the player.

    Declaration
    public void Hurt(float amount, DamageType damageType = DamageType.Unknown, string cassieAnnouncement = "")
    Parameters
    Type Name Description
    System.Single amount

    The langword_csharp_float amount of damage to deal.

    DamageType damageType

    The DamageType of the damage dealt.

    System.String cassieAnnouncement

    The langword_csharp_string cassie announcement to make if the damage kills the player.

    | Improve this Doc View Source

    Hurt(Single, String, String)

    Hurts the player.

    Declaration
    public void Hurt(float damage, string damageReason, string cassieAnnouncement = "")
    Parameters
    Type Name Description
    System.Single damage

    The amount of damage to deal.

    System.String damageReason

    The reason for the damage being dealt.

    System.String cassieAnnouncement

    The cassie announcement to make.

    | Improve this Doc View Source

    IsEffectActive<T>()

    Gets a System.Boolean describing whether or not the given CustomPlayerEffects.StatusEffectBase is currently enabled.

    Declaration
    public bool IsEffectActive<T>()
    
        where T : StatusEffectBase
    Returns
    Type Description
    System.Boolean

    A System.Boolean determining whether or not the player effect is active.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to check.

    | Improve this Doc View Source

    Kick(String, Player)

    Kicks the player.

    Declaration
    public void Kick(string reason, Player issuer = null)
    Parameters
    Type Name Description
    System.String reason

    The kick reason.

    Player issuer

    The kick issuer.

    | Improve this Doc View Source

    Kill(DamageType, String)

    Kills the player.

    Declaration
    public void Kill(DamageType damageType, string cassieAnnouncement = "")
    Parameters
    Type Name Description
    DamageType damageType

    The DamageType the player has been killed.

    System.String cassieAnnouncement

    The cassie announcement to make upon death.

    | Improve this Doc View Source

    Kill(DamageHandlerBase)

    Kills the player.

    Declaration
    public void Kill(DamageHandlerBase damageHandlerBase)
    Parameters
    Type Name Description
    PlayerStatsSystem.DamageHandlerBase damageHandlerBase

    The PlayerStatsSystem.DamageHandlerBase.

    | Improve this Doc View Source

    Kill(String, String)

    Kills the player.

    Declaration
    public void Kill(string deathReason, string cassieAnnouncement = "")
    Parameters
    Type Name Description
    System.String deathReason

    The reason the player has been killed.

    System.String cassieAnnouncement

    The cassie announcement to make upon death.

    | Improve this Doc View Source

    Mute(Boolean)

    Persistently mutes the player. For temporary mutes, see IsMuted and IsIntercomMuted.

    Declaration
    public void Mute(bool isIntercom = false)
    Parameters
    Type Name Description
    System.Boolean isIntercom

    Whether or not this mute is for the intercom only.

    | Improve this Doc View Source

    OpenReportWindow(String)

    Opens the report window.

    Declaration
    public void OpenReportWindow(string text)
    Parameters
    Type Name Description
    System.String text

    The text to send.

    | Improve this Doc View Source

    PlaceBlood(Vector3)

    Declaration
    public void PlaceBlood(Vector3 direction)
    Parameters
    Type Name Description
    UnityEngine.Vector3 direction
    | Improve this Doc View Source

    PlaceTantrum(Boolean)

    Places a Tantrum (SCP-173's ability) under the player.

    Declaration
    public TantrumHazard PlaceTantrum(bool isActive = true)
    Parameters
    Type Name Description
    System.Boolean isActive

    Whether or not the tantrum will apply the Stained effect.

    Returns
    Type Description
    TantrumHazard

    The TantrumHazard instance..

    Remarks

    If isActive is true, the tantrum is moved slightly up from its original position. Otherwise, the collision will not be detected and the slowness will not work.

    | Improve this Doc View Source

    PlayGunSound(ItemType, Byte, Byte)

    Declaration
    public void PlayGunSound(ItemType type, byte volume, byte audioClipId = 0)
    Parameters
    Type Name Description
    ItemType type
    System.Byte volume
    System.Byte audioClipId
    | Improve this Doc View Source

    PlayShieldBreakSound()

    Plays the Hume Shield break sound effect from the player.

    Declaration
    public void PlayShieldBreakSound()
    Remarks

    This will only function if the player's IsHumeShieldedRole is true.

    | Improve this Doc View Source

    RandomTeleport(IEnumerable<Type>)

    Teleports the player to a random object.

    Declaration
    public void RandomTeleport(IEnumerable<Type> types)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Type> types

    The list of object types to choose from.

    | Improve this Doc View Source

    RandomTeleport(Type)

    Teleports player to a random object of a specific type.

    Declaration
    public void RandomTeleport(Type type)
    Parameters
    Type Name Description
    System.Type type

    Object for teleport.

    | Improve this Doc View Source

    RandomTeleport<T>()

    Teleports player to a random object of a specific type.

    Declaration
    public void RandomTeleport<T>()
    Type Parameters
    Name Description
    T

    Object for teleport.

    | Improve this Doc View Source

    Reconnect(UInt16, Single, Boolean, RoundRestartType)

    Reconnects the player to the server. Can be used to redirect them to another server on a different port but same IP.

    Declaration
    public void Reconnect(ushort newPort = 0, float delay = 5F, bool reconnect = true, RoundRestartType roundRestartType = RoundRestartType.FullRestart)
    Parameters
    Type Name Description
    System.UInt16 newPort

    New port.

    System.Single delay

    Player reconnection delay.

    System.Boolean reconnect

    Whether or not player should be reconnected.

    RoundRestarting.RoundRestartType roundRestartType

    Type of round restart.

    | Improve this Doc View Source

    ReloadReservedSlots()

    Reloads the reserved slot list, clearing all reserved slot changes made with add/remove methods and reverting to the reserved slots files.

    Declaration
    public static void ReloadReservedSlots()
    | Improve this Doc View Source

    ReloadWeapon()

    Forces the player to reload their current weapon.

    Declaration
    public bool ReloadWeapon()
    Returns
    Type Description
    System.Boolean

    true if firearm was successfully reloaded. Otherwise, false.

    | Improve this Doc View Source

    ReloadWhitelist()

    Reloads the whitelist, clearing all whitelist changes made with add/remove methods and reverting to the whitelist files.

    Declaration
    public static void ReloadWhitelist()
    | Improve this Doc View Source

    RemoteAdminMessage(String, Boolean, String)

    Sends a message to the player's Remote Admin console.

    Declaration
    public void RemoteAdminMessage(string message, bool success = true, string pluginName = null)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    System.Boolean success

    Indicates whether or not the message should be highlighted as success.

    System.String pluginName

    The plugin name.

    | Improve this Doc View Source

    RemoveHandcuffs()

    Removes the player's handcuffs.

    Declaration
    public void RemoveHandcuffs()
    | Improve this Doc View Source

    RemoveHeldItem(Boolean)

    Removes the held InventorySystem.Items.ItemBase from the player's inventory.

    Declaration
    public bool RemoveHeldItem(bool destroy = true)
    Parameters
    Type Name Description
    System.Boolean destroy

    Whether or not to destroy the item.

    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether or not the InventorySystem.Items.ItemBase was removed.

    | Improve this Doc View Source

    RemoveItem(Item, Boolean)

    Removes an Item from the player's inventory.

    Declaration
    public bool RemoveItem(Item item, bool destroy = true)
    Parameters
    Type Name Description
    Item item

    The Item to remove.

    System.Boolean destroy

    Whether or not to destroy the item.

    Returns
    Type Description
    System.Boolean

    A value indicating whether or not the Item was removed.

    | Improve this Doc View Source

    RemoveItem(Func<Item, Boolean>, Boolean)

    Removes all Item's that satisfy the condition from the player's inventory.

    Declaration
    public int RemoveItem(Func<Item, bool> predicate, bool destroy = true)
    Parameters
    Type Name Description
    System.Func<Item, System.Boolean> predicate

    The condition to satisfy.

    System.Boolean destroy

    Whether or not to destroy the items.

    Returns
    Type Description
    System.Int32

    Count of a successfully removed Item's.

    | Improve this Doc View Source

    RemoveItem(UInt16, Boolean)

    Removes an Item from the player's inventory.

    Declaration
    public bool RemoveItem(ushort serial, bool destroy = true)
    Parameters
    Type Name Description
    System.UInt16 serial

    The Item serial to remove.

    System.Boolean destroy

    Whether or not to destroy the item.

    Returns
    Type Description
    System.Boolean

    A value indicating whether or not the Item was removed.

    | Improve this Doc View Source

    ResetInventory(IEnumerable<Item>)

    Resets the player's inventory to the provided list of items, clearing any items it already possess.

    Declaration
    public void ResetInventory(IEnumerable<Item> newItems)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Item> newItems

    The new items that have to be added to the inventory.

    | Improve this Doc View Source

    ResetInventory(IEnumerable<ItemType>)

    Resets the player's inventory to the provided list of items, clearing any items it already possess.

    Declaration
    public void ResetInventory(IEnumerable<ItemType> newItems)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ItemType> newItems

    The new items that have to be added to the inventory.

    | Improve this Doc View Source

    ResetStamina()

    Resets the Player's stamina.

    Declaration
    public void ResetStamina()
    | Improve this Doc View Source

    SendConsoleMessage(String, String)

    Sends a console message to the player's console.

    Declaration
    public void SendConsoleMessage(string message, string color)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    System.String color

    The message color.

    | Improve this Doc View Source

    SendStaffMessage(String, EncryptedChannelManager.EncryptedChannel)

    Sends a message to the player's Remote Admin Chat.

    Declaration
    public bool SendStaffMessage(string message, EncryptedChannelManager.EncryptedChannel channel = EncryptedChannelManager.EncryptedChannel.AdminChat)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    EncryptedChannelManager.EncryptedChannel channel

    Indicates whether or not the message should be highlighted as success.

    Returns
    Type Description
    System.Boolean

    true if message was send; otherwise, false.

    | Improve this Doc View Source

    SendStaffPing(String, EncryptedChannelManager.EncryptedChannel)

    Sends a message to the player's Remote Admin Chat.

    Declaration
    public bool SendStaffPing(string message, EncryptedChannelManager.EncryptedChannel channel = EncryptedChannelManager.EncryptedChannel.AdminChat)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    EncryptedChannelManager.EncryptedChannel channel

    Indicates whether or not the message should be highlighted as success.

    Returns
    Type Description
    System.Boolean

    true if message was send; otherwise, false.

    | Improve this Doc View Source

    SetAmmo(AmmoType, UInt16)

    Sets the amount of a specified ammo type to the player's inventory.

    Declaration
    public void SetAmmo(AmmoType ammoType, ushort amount)
    Parameters
    Type Name Description
    AmmoType ammoType

    The AmmoType to be set.

    System.UInt16 amount

    The amount of ammo to be set.

    | Improve this Doc View Source

    SetCooldownItem(Single, ItemType)

    Set the time cooldown on this ItemType.

    Declaration
    public void SetCooldownItem(float time, ItemType itemType)
    Parameters
    Type Name Description
    System.Single time

    The times for the cooldown.

    ItemType itemType

    The itemtypes to choose for being cooldown.

    | Improve this Doc View Source

    SetCustomRoleFriendlyFire(String, RoleTypeId, Single)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public void SetCustomRoleFriendlyFire(string roleTypeId, RoleTypeId roleToAdd, float ffMult)
    Parameters
    Type Name Description
    System.String roleTypeId

    Role associated for CustomFF.

    PlayerRoles.RoleTypeId roleToAdd

    Role to add.

    System.Single ffMult

    Friendly fire multiplier.

    | Improve this Doc View Source

    SetCustomRoleFriendlyFire(String, KeyValuePair<RoleTypeId, Single>)

    Wrapper to call SetCustomRoleFriendlyFire(String, RoleTypeId, Single).

    Declaration
    public void SetCustomRoleFriendlyFire(string roleTypeId, KeyValuePair<RoleTypeId, float> roleFf)
    Parameters
    Type Name Description
    System.String roleTypeId

    Role associated for CustomFF.

    System.Collections.Generic.KeyValuePair<PlayerRoles.RoleTypeId, System.Single> roleFf

    Role with FF to add even if it exists.

    | Improve this Doc View Source

    SetFriendlyFire(RoleTypeId, Single)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public void SetFriendlyFire(RoleTypeId roleToAdd, float ffMult)
    Parameters
    Type Name Description
    PlayerRoles.RoleTypeId roleToAdd

    Role to add.

    System.Single ffMult

    Friendly fire multiplier.

    | Improve this Doc View Source

    SetFriendlyFire(KeyValuePair<RoleTypeId, Single>)

    Wrapper to call SetFriendlyFire(RoleTypeId, Single).

    Declaration
    public void SetFriendlyFire(KeyValuePair<RoleTypeId, float> roleFF)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<PlayerRoles.RoleTypeId, System.Single> roleFF

    Role with FF to add even if it exists.

    | Improve this Doc View Source

    SetRank(String, UserGroup)

    Sets the player's rank.

    Declaration
    public void SetRank(string name, UserGroup group)
    Parameters
    Type Name Description
    System.String name

    The rank name to be set.

    UserGroup group

    The group to be set.

    | Improve this Doc View Source

    ShowHint(Hint)

    Show a hint to the player.

    Declaration
    public void ShowHint(Hint hint)
    Parameters
    Type Name Description
    Hint hint

    The hint to be shown.

    | Improve this Doc View Source

    ShowHint(String, Single)

    Shows a hint to the player.

    Declaration
    public void ShowHint(string message, float duration = 3F)
    Parameters
    Type Name Description
    System.String message

    The message to be shown.

    System.Single duration

    The duration the text will be on screen.

    | Improve this Doc View Source

    ShowHitMarker(Single)

    Sends a HitMarker to the player.

    Declaration
    public void ShowHitMarker(float size = 1F)
    Parameters
    Type Name Description
    System.Single size

    The size of the hitmarker, ranging from 0 to Hitmarker.MaxSize).

    | Improve this Doc View Source

    SyncEffect(Effect)

    Syncs the status effect on the player.

    Declaration
    public void SyncEffect(Effect effect)
    Parameters
    Type Name Description
    Effect effect

    The Effect to sync.

    | Improve this Doc View Source

    SyncEffects(IEnumerable<Effect>)

    Syncs a System.Collections.Generic.IEnumerable<T> of Effect on the player.

    Declaration
    public void SyncEffects(IEnumerable<Effect> effects)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Effect> effects

    The System.Collections.Generic.IEnumerable<T> of Effect to enable.

    | Improve this Doc View Source

    Teleport(Object)

    Teleports the player to the given object, with no offset.

    Declaration
    public void Teleport(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to teleport to.

    | Improve this Doc View Source

    Teleport(Object, Vector3)

    Teleports the player to the given object, offset by the defined offset value.

    Declaration
    public void Teleport(object obj, Vector3 offset)
    Parameters
    Type Name Description
    System.Object obj

    The object to teleport the player to.

    UnityEngine.Vector3 offset

    The offset to teleport.

    | Improve this Doc View Source

    Teleport(Vector3)

    Teleports the player to the given UnityEngine.Vector3 coordinates.

    Declaration
    public void Teleport(Vector3 position)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position

    The UnityEngine.Vector3 coordinates to move the player to.

    | Improve this Doc View Source

    ThrowGrenade(ProjectileType, Boolean)

    Forces the player to throw a grenade.

    Declaration
    public Throwable ThrowGrenade(ProjectileType type, bool fullForce = true)
    Parameters
    Type Name Description
    ProjectileType type

    The ProjectileType to be thrown.

    System.Boolean fullForce

    Whether to throw with full or half force.

    Returns
    Type Description
    Throwable

    The Throwable item that was spawned.

    | Improve this Doc View Source

    ThrowItem(Throwable, Boolean)

    Forcefully throws a throwable item.

    Declaration
    public void ThrowItem(Throwable throwable, bool fullForce = true)
    Parameters
    Type Name Description
    Throwable throwable

    The Throwable to be thrown.

    System.Boolean fullForce

    Whether to throw with full or half force.

    | Improve this Doc View Source

    ToString()

    Converts the player in a human-readable format.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A string containing Player-related data.

    Overrides
    System.Object.ToString()
    | Improve this Doc View Source

    TryAddCandy(CandyKindID)

    Gives the player a specific candy. Will give the player a bag if they do not already have one.

    Declaration
    public bool TryAddCandy(CandyKindID candyType)
    Parameters
    Type Name Description
    InventorySystem.Items.Usables.Scp330.CandyKindID candyType

    The InventorySystem.Items.Usables.Scp330.CandyKindID to give.

    Returns
    Type Description
    System.Boolean

    true if a candy was given.

    | Improve this Doc View Source

    TryAddCustomRoleFriendlyFire(Dictionary<String, Dictionary<RoleTypeId, Single>>)

    Adds the Custom role to the CustomRoleFriendlyFireMultiplier if they did not already exist.

    Declaration
    public void TryAddCustomRoleFriendlyFire(Dictionary<string, Dictionary<RoleTypeId, float>> customRoleFriendlyFireMultiplier)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single>> customRoleFriendlyFireMultiplier

    Custom role with FF role rules.

    | Improve this Doc View Source

    TryAddCustomRoleFriendlyFire(String, RoleTypeId, Single)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules for CustomRole.

    Declaration
    public bool TryAddCustomRoleFriendlyFire(string roleTypeId, RoleTypeId roleToAdd, float ffMult)
    Parameters
    Type Name Description
    System.String roleTypeId

    Role associated for CustomFF.

    PlayerRoles.RoleTypeId roleToAdd

    Role to add.

    System.Single ffMult

    Friendly fire multiplier.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryAddCustomRoleFriendlyFire(String, Dictionary<RoleTypeId, Single>, Boolean)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public bool TryAddCustomRoleFriendlyFire(string customRoleName, Dictionary<RoleTypeId, float> ffRules, bool overwrite = false)
    Parameters
    Type Name Description
    System.String customRoleName

    Role associated for CustomFF.

    System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single> ffRules

    Roles to add with friendly fire values.

    System.Boolean overwrite

    Whether to overwrite current values if they exist - does NOT delete previous entries if they are not in provided rules.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryAddCustomRoleFriendlyFire(String, KeyValuePair<RoleTypeId, Single>)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules for CustomRole.

    Declaration
    public bool TryAddCustomRoleFriendlyFire(string roleTypeId, KeyValuePair<RoleTypeId, float> roleFf)
    Parameters
    Type Name Description
    System.String roleTypeId

    Role associated for CustomFF.

    System.Collections.Generic.KeyValuePair<PlayerRoles.RoleTypeId, System.Single> roleFf

    Role to add and FF multiplier.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryAddFriendlyFire(RoleTypeId, Single)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public bool TryAddFriendlyFire(RoleTypeId roleToAdd, float ffMult)
    Parameters
    Type Name Description
    PlayerRoles.RoleTypeId roleToAdd

    Role to add.

    System.Single ffMult

    Friendly fire multiplier.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryAddFriendlyFire(Dictionary<RoleTypeId, Single>, Boolean)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public bool TryAddFriendlyFire(Dictionary<RoleTypeId, float> ffRules, bool overwrite = false)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single> ffRules

    Roles to add with friendly fire values.

    System.Boolean overwrite

    Whether or not to overwrite current values if they exist.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryAddFriendlyFire(KeyValuePair<RoleTypeId, Single>)

    Tries to add PlayerRoles.RoleTypeId to FriendlyFire rules.

    Declaration
    public bool TryAddFriendlyFire(KeyValuePair<RoleTypeId, float> pairedRoleFF)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<PlayerRoles.RoleTypeId, System.Single> pairedRoleFF

    Role FF multiplier to add.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryGet(CommandSender, out Player)

    Try-get a player given a CommandSender.

    Declaration
    public static bool TryGet(CommandSender sender, out Player player)
    Parameters
    Type Name Description
    CommandSender sender

    The CommandSender.

    Player player

    The player that matches the given CommandSender, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(ICommandSender, out Player)

    Try-get a player given a CommandSystem.ICommandSender.

    Declaration
    public static bool TryGet(ICommandSender sender, out Player player)
    Parameters
    Type Name Description
    CommandSystem.ICommandSender sender

    The CommandSystem.ICommandSender.

    Player player

    The player that matches the given CommandSystem.ICommandSender, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(Footprint, out Player)

    Try-get a player given a Footprinting.Footprint.

    Declaration
    public static bool TryGet(Footprint footprint, out Player player)
    Parameters
    Type Name Description
    Footprinting.Footprint footprint

    The Footprinting.Footprint.

    Player player

    The player that matches the given Footprinting.Footprint, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(NetworkConnection, out Player)

    Try-get a player given a Mirror.NetworkConnection.

    Declaration
    public static bool TryGet(NetworkConnection conn, out Player player)
    Parameters
    Type Name Description
    Mirror.NetworkConnection conn

    The Mirror.NetworkConnection.

    Player player

    The player that matches the given Mirror.NetworkConnection, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(NetworkIdentity, out Player)

    Try-get a player given a Mirror.NetworkIdentity.

    Declaration
    public static bool TryGet(NetworkIdentity netIdentity, out Player player)
    Parameters
    Type Name Description
    Mirror.NetworkIdentity netIdentity

    The Mirror.NetworkIdentity.

    Player player

    The player that matches the given Mirror.NetworkIdentity, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(Player, out Player)

    Try-get the Player from NwPluginAPI class.

    Declaration
    public static bool TryGet(Player apiPlayer, out Player player)
    Parameters
    Type Name Description
    PluginAPI.Core.Player apiPlayer

    The PluginAPI.Core.Player class.

    Player player

    The player found or null if not found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(ReferenceHub, out Player)

    Try-get a player given a ReferenceHub.

    Declaration
    public static bool TryGet(ReferenceHub referenceHub, out Player player)
    Parameters
    Type Name Description
    ReferenceHub referenceHub

    The ReferenceHub.

    Player player

    The player that matches the given ReferenceHub, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(Int32, out Player)

    Try-get a player given an ID.

    Declaration
    public static bool TryGet(int id, out Player player)
    Parameters
    Type Name Description
    System.Int32 id

    The user ID.

    Player player

    The player that matches the given ID, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(String, out Player)

    Try-get a player by identifier.

    Declaration
    public static bool TryGet(string args, out Player player)
    Parameters
    Type Name Description
    System.String args

    The player's nickname, ID, steamID64 or Discord ID.

    Player player

    The player found or null if not found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(UInt32, out Player)

    Try-get a player given a network ID.

    Declaration
    public static bool TryGet(uint netId, out Player player)
    Parameters
    Type Name Description
    System.UInt32 netId

    The network ID.

    Player player

    The player that matches the given net ID, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(Collider, out Player)

    Try-get player by UnityEngine.Collider.

    Declaration
    public static bool TryGet(Collider collider, out Player player)
    Parameters
    Type Name Description
    UnityEngine.Collider collider

    The UnityEngine.Collider.

    Player player

    The player found or null if not found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGet(GameObject, out Player)

    Try-get a player given a UnityEngine.GameObject.

    Declaration
    public static bool TryGet(GameObject gameObject, out Player player)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    The UnityEngine.GameObject.

    Player player

    The player that matches the given UnityEngine.GameObject, or null if no player is found.

    Returns
    Type Description
    System.Boolean

    A boolean indicating whether or not a player was found.

    | Improve this Doc View Source

    TryGetComponent(Type, out EActor)

    Declaration
    public bool TryGetComponent(Type type, out EActor component)
    Parameters
    Type Name Description
    System.Type type
    EActor component
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TryGetComponent<T>(out T)

    Declaration
    public bool TryGetComponent<T>(out T component)
    
        where T : EActor
    Parameters
    Type Name Description
    T component
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryGetComponent<T>(Type, out T)

    Declaration
    public bool TryGetComponent<T>(Type type, out T component)
    
        where T : EActor
    Parameters
    Type Name Description
    System.Type type
    T component
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryGetEffect(EffectType, out StatusEffectBase)

    Tries to get an instance of CustomPlayerEffects.StatusEffectBase by EffectType.

    Declaration
    public bool TryGetEffect(EffectType type, out StatusEffectBase statusEffect)
    Parameters
    Type Name Description
    EffectType type

    The EffectType.

    CustomPlayerEffects.StatusEffectBase statusEffect

    The CustomPlayerEffects.StatusEffectBase.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the statusEffect was successfully gotten.

    | Improve this Doc View Source

    TryGetEffect<T>(out T)

    Tries to get an instance of CustomPlayerEffects.StatusEffectBase by EffectType.

    Declaration
    public bool TryGetEffect<T>(out T statusEffect)
    
        where T : StatusEffectBase
    Parameters
    Type Name Description
    T statusEffect

    The CustomPlayerEffects.StatusEffectBase.

    Returns
    Type Description
    System.Boolean

    A bool indicating whether or not the statusEffect was successfully gotten.

    Type Parameters
    Name Description
    T

    The CustomPlayerEffects.StatusEffectBase to get.

    | Improve this Doc View Source

    TryGetItem(UInt16, out Item)

    Tries to get an item from a player's inventory.

    Declaration
    public bool TryGetItem(ushort serial, out Item item)
    Parameters
    Type Name Description
    System.UInt16 serial

    The unique identifier of the item.

    Item item

    The Item found. null if it doesn't exist.

    Returns
    Type Description
    System.Boolean

    true if the item is found, false otherwise.

    | Improve this Doc View Source

    TryGetSessionVariable<T>(String, out T)

    Safely gets an System.Object from SessionVariables, then casts it to T.

    Declaration
    public bool TryGetSessionVariable<T>(string key, out T result)
    Parameters
    Type Name Description
    System.String key

    The key of the object to get.

    T result

    When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter is used.

    Returns
    Type Description
    System.Boolean

    true if the SessionVariables contains an element with the specified key; otherwise, false.

    Type Parameters
    Name Description
    T

    The returned object type.

    | Improve this Doc View Source

    TryRemoveCustomeRoleFriendlyFire(String)

    Tries to remove PlayerRoles.RoleTypeId from FriendlyFire rules.

    Declaration
    public bool TryRemoveCustomeRoleFriendlyFire(string role)
    Parameters
    Type Name Description
    System.String role

    Role to add.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TryRemoveFriendlyFire(RoleTypeId)

    Tries to remove PlayerRoles.RoleTypeId from FriendlyFire rules.

    Declaration
    public bool TryRemoveFriendlyFire(RoleTypeId role)
    Parameters
    Type Name Description
    PlayerRoles.RoleTypeId role

    Role to add.

    Returns
    Type Description
    System.Boolean

    Whether or not the item was able to be added.

    | Improve this Doc View Source

    TrySetCustomRoleFriendlyFire(Dictionary<String, Dictionary<RoleTypeId, Single>>)

    Sets the CustomRoleFriendlyFireMultiplier.

    Declaration
    public void TrySetCustomRoleFriendlyFire(Dictionary<string, Dictionary<RoleTypeId, float>> customRoleFriendlyFireMultiplier)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single>> customRoleFriendlyFireMultiplier

    New rules for CustomeRoleFriendlyFireMultiplier to set to.

    | Improve this Doc View Source

    TrySetCustomRoleFriendlyFire(String, Dictionary<RoleTypeId, Single>)

    Sets the CustomRoleFriendlyFireMultiplier.

    Declaration
    public void TrySetCustomRoleFriendlyFire(string roleTypeId, Dictionary<RoleTypeId, float> customRoleFriendlyFireMultiplier)
    Parameters
    Type Name Description
    System.String roleTypeId

    Role to associate FF rules to.

    System.Collections.Generic.Dictionary<PlayerRoles.RoleTypeId, System.Single> customRoleFriendlyFireMultiplier

    New rules for CustomeRoleFriendlyFireMultiplier to set to.

    | Improve this Doc View Source

    UnMute(Boolean)

    Revokes a persistent mute. For temporary mutes, see IsMuted and IsIntercomMuted.

    Declaration
    public void UnMute(bool isIntercom = false)
    Parameters
    Type Name Description
    System.Boolean isIntercom

    Whether or not this un-mute is for the intercom only.

    | Improve this Doc View Source

    UseItem(Item)

    Forces the player to use an item.

    Declaration
    public bool UseItem(Item item)
    Parameters
    Type Name Description
    Item item

    The item to be used.

    Returns
    Type Description
    System.Boolean

    true if item was used successfully. Otherwise, false.

    | Improve this Doc View Source

    UseItem(ItemType)

    Forces the player to use an item.

    Declaration
    public bool UseItem(ItemType usableItem)
    Parameters
    Type Name Description
    ItemType usableItem

    The ItemType to be used.

    Returns
    Type Description
    System.Boolean

    true if item was used successfully. Otherwise, false.

    | Improve this Doc View Source

    Vaporize(Player, String)

    Kills the player and vaporizes the body.

    Declaration
    public void Vaporize(Player attacker = null, string cassieAnnouncement = "")
    Parameters
    Type Name Description
    Player attacker

    The Player attacking player.

    System.String cassieAnnouncement

    The cassie announcement to make upon death.

    Operators

    | Improve this Doc View Source

    Implicit(Player to Player)

    Converts NwPluginAPI player to EXILED player.

    Declaration
    public static implicit operator Player(Player player)
    Parameters
    Type Name Description
    PluginAPI.Core.Player player

    The NwPluginAPI player.

    Returns
    Type Description
    Player

    EXILED player.

    Implements

    IEntity
    IWorldSpace
    IPosition
    IRotation

    Extension Methods

    Permissions.CheckPermission(Player, String)
    Permissions.CheckPermission(Player, PlayerPermissions[])
    Extensions.ResetInventory(Player, IEnumerable<String>, Boolean)
    Extensions.GetCustomRoles(Player)
    Extensions.GetActiveAbilities(Player)
    Extensions.GetSelectedAbility(Player)
    MirrorExtensions.PlayBeepSound(Player)
    MirrorExtensions.SetPlayerInfoForTargetOnly(Player, Player, String)
    MirrorExtensions.PlayGunSound(Player, Vector3, ItemType, Byte, Byte)
    MirrorExtensions.SetName(Player, Player, String)
    MirrorExtensions.ChangeAppearance(Player, RoleTypeId, Boolean, Byte)
    MirrorExtensions.ChangeAppearance(Player, RoleTypeId, IEnumerable<Player>, Boolean, Byte)
    MirrorExtensions.PlayCassieAnnouncement(Player, String, Boolean, Boolean, Boolean)
    MirrorExtensions.MessageTranslated(Player, String, String, Boolean, Boolean, Boolean)
    MirrorExtensions.SendFakeSyncVar(Player, NetworkIdentity, Type, String, Object)
    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX