getStates

getStates([integer entity]) → set<integer> states

Returns the set of states active on the entity entity. Returns your own states if the parameter entity is not provided or is null.

Example:

STATE_INVINCIBLE in getStates(entity)
entity.states.includes(State.INVINCIBLE)
State.INVINCIBLE in entity.states
Parameters
Return