Skip to content

Commit

Permalink
[Performance] Replace stream with for loop in vanish check
Browse files Browse the repository at this point in the history
  • Loading branch information
NEZNAMY committed Feb 2, 2025
1 parent 438f21f commit ecd83be
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ public void markOffline() {
public boolean canSee(@NotNull TabPlayer target) {
if (!VanishIntegration.getHandlers().isEmpty()) {
try {
return VanishIntegration.getHandlers().stream().allMatch(integration -> integration.canSee(this, target));
for (VanishIntegration i : VanishIntegration.getHandlers()) {
if (!i.canSee(this, target)) return false;
}
} catch (ConcurrentModificationException e) {
// PV error, try again
return canSee(target);
Expand Down

0 comments on commit ecd83be

Please sign in to comment.