Correct unsafe future joining

This commit is contained in:
William278 committed 2022-09-07 22:36:06 +03:00
1 parent adac00ea47
commit 950a51c140
14 files changed
+42 -42

No files matched your search

@@ -139,7 +139,7 @@ public class RequestManager {
// If the player couldn't be found locally, send the request cross-server
if (plugin.getSettings().crossServer) {
// Find the matching networked target
return plugin.getNetworkMessenger().findPlayer(requester, targetUser).thenApply(networkedTarget -> {
return plugin.getNetworkMessenger().findPlayer(requester, targetUser).thenApplyAsync(networkedTarget -> {
if (networkedTarget.isEmpty()) {
return Optional.empty();
}