mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-20 01:29:54 +02:00
Update mail state on login
This commit is contained in:
@@ -55,6 +55,14 @@ public class Mailbox extends PlayerManager implements GameDatabaseObject, Iterab
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public boolean hasNewMail() {
|
||||
return this.getList()
|
||||
.stream()
|
||||
.filter(mail -> !mail.isRead() && !mail.isRecv())
|
||||
.findAny()
|
||||
.isPresent();
|
||||
}
|
||||
|
||||
public void sendMail(GameMail mail) {
|
||||
// Set mail id
|
||||
mail.setId(++this.lastMailId);
|
||||
|
||||
Reference in New Issue
Block a user