isEntityThread

open override fun isEntityThread(entity: Entity): Boolean

Folia & Paper: Returns whether the current thread is ticking a region and that the region being ticked owns the specified entity. Note that this function is the only appropriate method of checking for ownership of an entity, as retrieving the entity's location is undefined unless the entity is owned by the current region
Bukkit: returns {@link org.bukkit.Server#isPrimaryThread}