mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
Prevent massive amount of mails being send.
Added new config: mails-per-minute, default 1000
This commit is contained in:
parent
98d657ec4b
commit
0097f961b4
4 changed files with 36 additions and 2 deletions
|
@ -439,6 +439,7 @@ public class Settings implements ISettings
|
|||
chatRadius = _getChatRadius();
|
||||
commandCosts = _getCommandCosts();
|
||||
warnOnBuildDisallow = _warnOnBuildDisallow();
|
||||
mailsPerMinute = _getMailsPerMinute();
|
||||
}
|
||||
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
|
||||
|
||||
|
@ -936,4 +937,15 @@ public class Settings implements ISettings
|
|||
double maxSpeed = config.getDouble("max-walk-speed", 0.8);
|
||||
return maxSpeed > 1.0 ? 1.0 : Math.abs(maxSpeed);
|
||||
}
|
||||
|
||||
private int mailsPerMinute;
|
||||
|
||||
private int _getMailsPerMinute() {
|
||||
return config.getInt("mails-per-minute", 1000);
|
||||
}
|
||||
@Override
|
||||
public int getMailsPerMinute()
|
||||
{
|
||||
return mailsPerMinute;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue