From 33d5c5238a11e33bf7957647733e8c51e5a73498 Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 09:42:43 -0300 Subject: [PATCH] perf: `findAny().isPresent()` is cleaner here --- src/main/java/emu/grasscutter/game/player/TeamManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/game/player/TeamManager.java b/src/main/java/emu/grasscutter/game/player/TeamManager.java index d808fbf44..f79cb422d 100644 --- a/src/main/java/emu/grasscutter/game/player/TeamManager.java +++ b/src/main/java/emu/grasscutter/game/player/TeamManager.java @@ -83,7 +83,7 @@ public final class TeamManager extends BasePlayerDataManager { int embryoId = 0; // add from default - if (Arrays.stream(GameConstants.DEFAULT_TEAM_ABILITY_STRINGS).count() > 0) { + if (Arrays.stream(GameConstants.DEFAULT_TEAM_ABILITY_STRINGS).findAny().isPresent()) { List teamAbilties = Arrays.stream(GameConstants.DEFAULT_TEAM_ABILITY_STRINGS).toList(); for (String skill : teamAbilties) {