public static boolean canInteract(User issuer,User target,Guild guild){
  if (guild.getOwner() == issuer)   return true;
  if (guild.getOwner() == target)   return false;
  List<Role> issuerRoles=guild.getRolesForUser(issuer);
  List<Role> targetRoles=guild.getRolesForUser(target);
  if (issuerRoles == null)   throw new IllegalArgumentException("Issuer user is not in the provided guild!");
  if (targetRoles == null)   throw new IllegalArgumentException("Target user is not in the provided guild!");
  return !issuerRoles.isEmpty() && (targetRoles.isEmpty() || canInteract(issuerRoles.get(0),targetRoles.get(0)));
}

public static boolean canInteract ( User issuer , User target , Guild guild ) { if ( guild . getOwner ( ) == issuer ) return true ; if ( guild . getOwner ( ) == target ) return false ; List < Role > issuerRoles = guild . getRolesForUser ( issuer ) ; List < Role > targetRoles = guild . getRolesForUser ( target ) ; if ( issuerRoles == null ) throw new IllegalArgumentException ( "Issuer user is not in the provided guild!" ) ; if ( targetRoles == null ) throw new IllegalArgumentException ( "Target user is not in the provided guild!" ) ; return ! issuerRoles . isEmpty ( ) && ( targetRoles . isEmpty ( ) || canInteract ( issuerRoles . get ( 0 ) , targetRoles . get ( 0 ) ) ) ; }
checks if one given user can interact with a 2nd given user - in a permission sense ( kick / ban / modify perms ) . this only checks the role - position and does not check the actual permission ( kick / ban / manage_role / . . . )
