mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 17:12:03 +01:00
Add option to not send no new mail message on join.
This commit is contained in:
parent
f8160c6318
commit
f5b40dba34
@ -254,7 +254,9 @@ public class EssentialsPlayerListener implements Listener {
|
||||
if (!ess.getSettings().isCommandDisabled("mail") && user.isAuthorized("essentials.mail")) {
|
||||
final List<String> mail = user.getMails();
|
||||
if (mail.isEmpty()) {
|
||||
user.sendMessage(tl("noNewMail"));
|
||||
if(ess.getSettings().isNotifyNoNewMail()) {
|
||||
user.sendMessage(tl("noNewMail")); // Only notify if they want us to.
|
||||
}
|
||||
} else {
|
||||
user.sendMessage(tl("youHaveNewMail", mail.size()));
|
||||
}
|
||||
|
@ -215,4 +215,6 @@ public interface ISettings extends IConf {
|
||||
boolean isCustomQuitMessage();
|
||||
|
||||
String getCustomQuitMessage();
|
||||
|
||||
boolean isNotifyNoNewMail();
|
||||
}
|
||||
|
@ -1056,6 +1056,11 @@ public class Settings implements net.ess3.api.ISettings {
|
||||
return isCustomQuitMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNotifyNoNewMail() {
|
||||
return config.getBoolean("notify-no-new-mail", true);
|
||||
}
|
||||
|
||||
// #easteregg
|
||||
@Override
|
||||
public int getMaxUserCacheCount() {
|
||||
|
@ -86,6 +86,10 @@ spawnmob-limit: 10
|
||||
# Shall we notify users when using /lightning?
|
||||
warn-on-smite: true
|
||||
|
||||
# Essentials Mail Notification
|
||||
# Should we notify players if they have no new mail?
|
||||
notify-no-new-mail: true
|
||||
|
||||
# The motd and rules are now configured in the files motd.txt and rules.txt.
|
||||
|
||||
# When a command conflicts with another plugin, by default, Essentials will try to force the OTHER plugin to take priority.
|
||||
|
Loading…
Reference in New Issue
Block a user