fix: fix nullpointerexception in FindAltsCommand

This commit is contained in:
Chayapak 2024-11-17 17:41:05 +07:00
parent b424f29972
commit 9f10ca8a3e
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -39,6 +39,8 @@ public class FindAltsCommand extends Command {
else {
final CompletableFuture<String> future = bot.players.getPlayerIP(playerEntry);
if (future == null) return null;
future.thenApplyAsync(targetIP -> {
context.sendOutput(handle(bot, targetIP, false, player));