I have no idea why I'm getting this error: error message
This is line 107 (for loop):
        for (Pair<UUID, UUID> pair : timeStopList) {
           if (pair.getA() == playerUUID) {
              cancelTimeStop(pair.getB());
           }
        }
I hate to ask what might seem like such a simple solution but I really have no idea whats going on! So I would appreciate it that if you know the answer you could tell me. Thanks!
Code for cancelTimeStop:
    public static void cancelTimeStop(UUID entityUUID) {
    Entity unknownEntity = Bukkit.getEntity(entityUUID);
    if (unknownEntity == null || unknownEntity.isDead()) return;
    LivingEntity entity = (LivingEntity) unknownEntity;
    entity.removePotionEffect(PotionEffectType.SLOW);
    entity.removePotionEffect(PotionEffectType.BLINDNESS);
    entity.setGravity(true);
    entity.setAI(true);
    entity.setCanPickupItems(true);
    entity.setSilent(false);
    removeEntityFromTimeStop(entityUUID);
}
removeEntityFromTimeStop() is:
    private static void removeEntityFromTimeStop(UUID entityUUID) {
    if (timeStopList == null) return;
    timeStopList.removeIf(pair -> pair.getB() == entityUUID);
}
 
     
    