mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 06:57:39 +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;
|
return;
|
||||||
}
|
}
|
||||||
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0])) {
|
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.setMails(null);
|
||||||
user.sendMessage(tl("mailCleared"));
|
user.sendMessage(tl("mailCleared"));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user