Disentangling the roles of diversity resistance and priority effects in community assembly