Fix player cache not being updated on single-server mode, make #getNetworkMessenger @NotNull

This commit is contained in:
William committed 2022-08-30 18:15:26 +01:00
1 parent a952a372cc
commit 90291196f9
9 files changed
+31 -30

No files matched your search

@@ -38,7 +38,7 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe
: onlineUser.username : onlineUser.username);
// Find the online user to teleport
plugin.getCache().fetchAndCacheGlobalPlayerList(plugin, onlineUser).join();
plugin.getCache().updatePlayerListCache(plugin, onlineUser).join();
final String playerToTeleport = plugin.getCache().players.stream()
.filter(user -> user.equalsIgnoreCase(targetPlayerToTeleport)).findFirst()
.or(() -> plugin.getCache().players.stream()