mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Prevent sending requests to vanished players
This commit is contained in:
1 parent
6397d78767
commit
2152ca91f2
4 files changed
+24
-2
No files matched your search
@@ -102,7 +102,11 @@ public class Cache {
|
||||
});
|
||||
} else {
|
||||
players.clear();
|
||||
players.addAll(plugin.getOnlinePlayers().stream().map(onlineUser -> onlineUser.username).toList());
|
||||
players.addAll(plugin.getOnlinePlayers()
|
||||
.stream()
|
||||
.filter(player -> !player.isVanished())
|
||||
.map(onlineUser -> onlineUser.username)
|
||||
.toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user