mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-29 13:25:30 +00: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 a new issue