mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Adjust caching mechanism for player lists
This commit is contained in:
1 parent
0c1ad832ea
commit
ccda814c88
3 files changed
+20
-21
No files matched your search
@@ -40,10 +40,8 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe
|
||||
// Find the online user to teleport
|
||||
plugin.getCache().updatePlayerListCache(plugin, onlineUser).thenRun(() -> {
|
||||
// Get the list of potential teleports, filtered against vanished players, but ensuring the executor is in the list
|
||||
final List<String> players = plugin.getCache().players;
|
||||
if (!players.contains(onlineUser.username)) {
|
||||
players.add(onlineUser.username);
|
||||
}
|
||||
final Set<String> players = plugin.getCache().players;
|
||||
players.add(onlineUser.username);
|
||||
|
||||
// Find the player to teleport
|
||||
final String playerToTeleport = players.stream()
|
||||
|
||||
Reference in new issue
Block a user