Skip to content

Commit

Permalink
fix(api): Fixed NPE in AuthMeVelocityAPI#removePlayerIf
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed Apr 22, 2023
1 parent d617995 commit e4716b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -61,7 +61,7 @@ public interface AuthMeVelocityAPI {
* Removes players who meet the established condition
* @param predicate the condition
*/
void removePlayerIf(@NotNull Predicate<Player> predicate);
void removePlayerIf(@NotNull Predicate<@NotNull Player> predicate);

/**
* Check if the player is on a login server
Expand Down
Expand Up @@ -186,7 +186,7 @@ public boolean removePlayer(@NotNull Player player){

@Override
public void removePlayerIf(@NotNull Predicate<Player> predicate){
loggedPlayers.removeIf(uuid -> predicate.test(proxy.getPlayer(uuid).orElse(null)));
loggedPlayers.removeIf(uuid -> proxy.getPlayer(uuid).filter(predicate).isPresent());
}

@Override
Expand Down

0 comments on commit e4716b4

Please sign in to comment.