Skip to main content

Interface IClientState

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

Assembly: Dalamud.dll
View Source
Declaration
public interface IClientState

Properties

ClientLanguage

Gets the language of the client.

View Source
Declaration
ClientLanguage ClientLanguage { get; }

TerritoryType

Gets the current Territory the player resides in.

View Source
Declaration
ushort TerritoryType { get; }

MapId

Gets the current Map the player resides in.

View Source
Declaration
uint MapId { get; }

LocalPlayer

Gets the local player character, if one is present.

View Source
Declaration
IPlayerCharacter? LocalPlayer { get; }

LocalContentId

Gets the content ID of the local character.

View Source
Declaration
ulong LocalContentId { get; }

IsLoggedIn

Gets a value indicating whether a character is logged in.

View Source
Declaration
bool IsLoggedIn { get; }

IsPvP

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

View Source
Declaration
bool IsPvP { get; }

IsPvPExcludingDen

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

View Source
Declaration
bool IsPvPExcludingDen { get; }

IsGPosing

Gets a value indicating whether the client is currently in Group Pose (GPose) mode.

View Source
Declaration
bool IsGPosing { get; }

Methods

IsClientIdle(out ConditionFlag)

Check whether the client is currently "idle". This means a player is not logged in, or is notctively in combat or doing anything that we may not want to disrupt.

View Source
Declaration
bool IsClientIdle(out ConditionFlag blockingFlag)
Returns

System.Boolean: Returns true if the client is idle, false otherwise.

Parameters
TypeNameDescription
Dalamud.Game.ClientState.Conditions.ConditionFlagblockingFlagAn outvar containing the first observed condition blocking the "idle" state. 0 if idle.

IsClientIdle()

Check whether the client is currently "idle". This means a player is not logged in, or is notctively in combat or doing anything that we may not want to disrupt.

View Source
Declaration
bool IsClientIdle()
Returns

System.Boolean: Returns true if the client is idle, false otherwise.## Events

TerritoryChanged

Event that gets fired when the current Territory changes.

View Source
Declaration
event Action<ushort> TerritoryChanged
Event Type

System.Action<System.UInt16>

ClassJobChanged

Event that fires when a characters ClassJob changed.

View Source
Declaration
event IClientState.ClassJobChangeDelegate? ClassJobChanged
Event Type

Dalamud.Plugin.Services.IClientState.ClassJobChangeDelegate

LevelChanged

Event that fires when <em>any</em> character level changes, including levels for a not-currently-active ClassJob (e.g. PvP matches, DoH/DoL).

View Source
Declaration
event IClientState.LevelChangeDelegate? LevelChanged
Event Type

Dalamud.Plugin.Services.IClientState.LevelChangeDelegate

Login

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

View Source
Declaration
event Action Login
Event Type

System.Action

Logout

Event that fires when a character is logging out.

View Source
Declaration
event Action Logout
Event Type

System.Action

EnterPvP

Event that fires when a character is entering PvP.

View Source
Declaration
event Action EnterPvP
Event Type

System.Action

LeavePvP

Event that fires when a character is leaving PvP.

View Source
Declaration
event Action LeavePvP
Event Type

System.Action

CfPop

Event that gets fired when a duty is ready.

View Source
Declaration
event Action<ContentFinderCondition> CfPop
Event Type

System.Action<Lumina.Excel.GeneratedSheets.ContentFinderCondition>