forked from ChomeNS/chomens-bot-java
fix nullpointer
This commit is contained in:
parent
5d4aa73fd6
commit
72df0bbaba
1 changed files with 2 additions and 0 deletions
|
@ -64,6 +64,8 @@ public class MailCommand implements Command {
|
|||
case "send" -> {
|
||||
int senderMailsSentTotal = 0;
|
||||
for (Mail mail : MailPlugin.mails()) {
|
||||
if (mail.sentBy() == null) continue;
|
||||
|
||||
if (!mail.sentBy().equals(sender.profile().getName())) continue;
|
||||
senderMailsSentTotal++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue