mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-14 22:55:55 +01:00
Fixed when the mail has already cleared (#2063)
This commit is contained in:
parent
eac1e9b574
commit
3f5f9cc717
@ -87,6 +87,11 @@ public class Commandmail extends EssentialsCommand {
|
||||
return;
|
||||
}
|
||||
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0])) {
|
||||
if (user.getMails() == null || user.getMails().isEmpty()) {
|
||||
user.sendMessage(tl("noMail"));
|
||||
throw new NoChargeException();
|
||||
}
|
||||
|
||||
user.setMails(null);
|
||||
user.sendMessage(tl("mailCleared"));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user