Reduce future join call usage

This commit is contained in:
William committed 2022-09-24 22:00:48 +01:00
1 parent 8a4ed7c565
commit 649d4c0600
18 files changed
+316 -291

No files matched your search

@@ -30,7 +30,7 @@ public class HomeCommand extends CommandBase implements TabCompletable, ConsoleE
switch (homes.size()) {
case 0 -> plugin.getLocales().getLocale("error_no_homes_set").ifPresent(onlineUser::sendMessage);
case 1 -> plugin.getTeleportManager().timedTeleport(onlineUser, homes.get(0)).thenAccept(result ->
plugin.getTeleportManager().finishTeleport(onlineUser, result)).join();
plugin.getTeleportManager().finishTeleport(onlineUser, result));
default -> plugin.getCache().getHomeList(onlineUser, onlineUser,
plugin.getLocales(), homes, plugin.getSettings().listItemsPerPage, 1)
.ifPresent(onlineUser::sendMessage);