diff --git a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/AuthMeVelocityAPI.java b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/AuthMeVelocityAPI.java index 293a188..fb430cd 100644 --- a/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/AuthMeVelocityAPI.java +++ b/api/velocity/src/main/java/io/github/_4drian3d/authmevelocity/api/velocity/AuthMeVelocityAPI.java @@ -61,7 +61,7 @@ public interface AuthMeVelocityAPI { * Removes players who meet the established condition * @param predicate the condition */ - void removePlayerIf(@NotNull Predicate predicate); + void removePlayerIf(@NotNull Predicate<@NotNull Player> predicate); /** * Check if the player is on a login server diff --git a/velocity/src/main/java/io/github/_4drian3d/authmevelocity/velocity/AuthMeVelocityPlugin.java b/velocity/src/main/java/io/github/_4drian3d/authmevelocity/velocity/AuthMeVelocityPlugin.java index d857bfe..2b9f69e 100644 --- a/velocity/src/main/java/io/github/_4drian3d/authmevelocity/velocity/AuthMeVelocityPlugin.java +++ b/velocity/src/main/java/io/github/_4drian3d/authmevelocity/velocity/AuthMeVelocityPlugin.java @@ -186,7 +186,7 @@ public final class AuthMeVelocityPlugin implements AuthMeVelocityAPI { @Override public void removePlayerIf(@NotNull Predicate predicate){ - loggedPlayers.removeIf(uuid -> predicate.test(proxy.getPlayer(uuid).orElse(null))); + loggedPlayers.removeIf(uuid -> proxy.getPlayer(uuid).filter(predicate).isPresent()); } @Override