mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
fix recipient being cached but offline, causing NPE
This commit is contained in:
1 parent
e271a38887
commit
eeedea49bb
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -43,7 +43,7 @@ public class ContinueCommand {
|
||||
.player(whisperTarget).join();
|
||||
final @MonotonicNonNull CarbonPlayer recipient = result.player();
|
||||
|
||||
if (recipient == null) {
|
||||
if (recipient == null || !recipient.online()) {
|
||||
messageService.whisperTargetOffline(sender, CarbonPlayer.renderName(sender));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ReplyCommand {
|
||||
final ComponentPlayerResult<CarbonPlayer> result = carbonChat.server().player(replyTarget).join();
|
||||
final @MonotonicNonNull CarbonPlayer recipient = result.player();
|
||||
|
||||
if (recipient == null) {
|
||||
if (recipient == null || !recipient.online()) {
|
||||
messageService.replyTargetOffline(sender, CarbonPlayer.renderName(sender));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user