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.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Role string such as TANK, HEALER, DAMAGER, or NONE.
Example
Section titled “Example”if E:GetPlayerRole() == "TANK" then EnableTankWidget()endUse when addon behavior should follow ElvUI role detection rather than only UnitGroupRolesAssigned.
Source: ElvUI/Game/Shared/General/API.lua:573