Show / Hide Table of Contents

# Class ClientState

This class represents the state of the game client at the time of access.

##### Inheritance

System.Object
ClientState

##### Implements

System.IDisposable
IServiceType

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Dalamud.Game.ClientState

###### Assembly: Dalamud.dll

##### Syntax

    public sealed class ClientState : IDisposable, IServiceType

### Properties

| Improve this Doc View Source

#### ClientLanguage

Gets the language of the client.

##### Declaration

    public ClientLanguage ClientLanguage { get; }

##### Property Value

Type | Description
--- | ---
ClientLanguage |

| Improve this Doc View Source

#### IsLoggedIn

Gets a value indicating whether a character is logged in.

##### Declaration

    public bool IsLoggedIn { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsPvP

Gets a value indicating whether or not the user is playing PvP.

##### Declaration

    public bool IsPvP { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsPvPExcludingDen

Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.

##### Declaration

    public bool IsPvPExcludingDen { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### LocalContentId

Gets the content ID of the local character.

##### Declaration

    public ulong LocalContentId { get; }

##### Property Value

Type | Description
--- | ---
System.UInt64 |

| Improve this Doc View Source

#### LocalPlayer

Gets the local player character, if one is present.

##### Declaration

    public PlayerCharacter LocalPlayer { get; }

##### Property Value

Type | Description
--- | ---
PlayerCharacter |

| Improve this Doc View Source

#### TerritoryType

Gets the current Territory the player resides in.

##### Declaration

    public ushort TerritoryType { get; }

##### Property Value

Type | Description
--- | ---
System.UInt16 |

### Events

| Improve this Doc View Source

#### CfPop

Event that gets fired when a duty is ready.

##### Declaration

    public event EventHandler<Lumina.Excel.GeneratedSheets.ContentFinderCondition> CfPop

##### Event Type

Type | Description
--- | ---
System.EventHandler<Lumina.Excel.GeneratedSheets.ContentFinderCondition> |

| Improve this Doc View Source

#### EnterPvP

Event that fires when a character is entering PvP.

##### Declaration

    public event Action EnterPvP

##### Event Type

Type | Description
--- | ---
System.Action |

| Improve this Doc View Source

#### LeavePvP

Event that fires when a character is leaving PvP.

##### Declaration

    public event Action LeavePvP

##### Event Type

Type | Description
--- | ---
System.Action |

| Improve this Doc View Source

#### Login

Event that fires when a character is logging in, and the local character object is available.

##### Declaration

    public event EventHandler Login

##### Event Type

Type | Description
--- | ---
System.EventHandler |

| Improve this Doc View Source

#### Logout

Event that fires when a character is logging out.

##### Declaration

    public event EventHandler Logout

##### Event Type

Type | Description
--- | ---
System.EventHandler |

| Improve this Doc View Source

#### TerritoryChanged

Event that gets fired when the current Territory changes.

##### Declaration

    public event EventHandler<ushort> TerritoryChanged

##### Event Type

Type | Description
--- | ---
System.EventHandler<System.UInt16> |

### Explicit Interface Implementations

| Improve this Doc View Source

#### IDisposable.Dispose()

Dispose of managed and unmanaged resources.

##### Declaration

    void IDisposable.Dispose()

### Implements

System.IDisposable
IServiceType