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