mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fixing mail argument errors.
This commit is contained in:
parent
ea76161ba5
commit
b2614e363b
1 changed files with 7 additions and 4 deletions
|
@ -23,13 +23,15 @@ public class Commandmail extends EssentialsCommand
|
||||||
List<String> mail = user.getMails();
|
List<String> mail = user.getMails();
|
||||||
if (mail.isEmpty())
|
if (mail.isEmpty())
|
||||||
{
|
{
|
||||||
throw new Exception(Util.i18n("noMail"));
|
user.sendMessage(Util.i18n("noMail"));
|
||||||
|
throw new NoChargeException();
|
||||||
}
|
}
|
||||||
for (String s : mail)
|
for (String s : mail)
|
||||||
{
|
{
|
||||||
user.sendMessage(s);
|
user.sendMessage(s);
|
||||||
}
|
}
|
||||||
throw new Exception(Util.i18n("mailClear"));
|
user.sendMessage(Util.i18n("mailClear"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
|
if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
|
||||||
{
|
{
|
||||||
|
@ -62,8 +64,9 @@ public class Commandmail extends EssentialsCommand
|
||||||
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0]))
|
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0]))
|
||||||
{
|
{
|
||||||
user.setMails(null);
|
user.setMails(null);
|
||||||
throw new Exception(Util.i18n("mailCleared"));
|
user.sendMessage(Util.i18n("mailCleared"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
throw new NoChargeException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue