Skip to content

Get Player Role

Core Helper

Returns ElvUI’s best-known player group role with spec fallback.

NamespaceEModuleCoreLifecyclestable
E:GetPlayerRole()

Returns ElvUI’s best-known player group role with spec fallback.

None.

Role string such as TANK, HEALER, DAMAGER, or NONE.

if E:GetPlayerRole() == "TANK" then
EnableTankWidget()
end

Use when addon behavior should follow ElvUI role detection rather than only UnitGroupRolesAssigned.

Source: ElvUI/Game/Shared/General/API.lua:573