mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Make the /tpahere and /tpa request sent confirmation message accurately report who the request was sent to
This commit is contained in:
1 parent
c0b6b45617
commit
f32082a8bf
5 files changed
+33
-25
No files matched your search
@@ -39,7 +39,7 @@ public class TpaAllCommand extends CommandBase {
|
||||
final List<CompletableFuture<Void>> sentRequestsFuture = new ArrayList<>();
|
||||
players.forEach(playerName -> sentRequestsFuture.add(plugin.getRequestManager()
|
||||
.sendTeleportRequest(onlineUser, playerName, TeleportRequest.RequestType.TPA_HERE)
|
||||
.thenAccept(sent -> counter.addAndGet(sent ? 1 : 0))));
|
||||
.thenAccept(sent -> counter.addAndGet(sent.isPresent() ? 1 : 0))));
|
||||
|
||||
// Send a message when all requests have been sent
|
||||
CompletableFuture.allOf(sentRequestsFuture.toArray(new CompletableFuture[0])).thenRun(() -> {
|
||||
|
||||
Reference in new issue
Block a user