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

@@ -92,7 +92,7 @@ public class RequestManager {
// If the player couldn't be found locally, send the request cross-server
if (plugin.getSettings().crossServer) {
assert plugin.getNetworkMessenger() != null;
// Find the matching networked target
return plugin.getNetworkMessenger().findPlayer(requester, targetUser).thenApply(networkedTarget -> {
@@ -213,7 +213,7 @@ public class RequestManager {
if (localRequester.isPresent()) {
handleLocalRequestResponse(localRequester.get(), request);
} else if (plugin.getSettings().crossServer) {
assert plugin.getNetworkMessenger() != null;
// Ensure the sender is still online
if (!plugin.getNetworkMessenger().findPlayer(recipient, request.requesterName).thenApply(networkedTarget -> {
if (networkedTarget.isEmpty()) {