fix(api): Fixed NPE in AuthMeVelocityAPI#removePlayerIf
This commit is contained in:
parent
d617995bbe
commit
e4716b44cc
@ -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
|
||||
|
@ -186,7 +186,7 @@ public final class AuthMeVelocityPlugin implements AuthMeVelocityAPI {
|
||||
|
||||
@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
|
||||
|
Loading…
x
Reference in New Issue
Block a user