mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 12:02:53 +00:00
Add Minimum Balance, to allow people to manage overdrafts.
This commit is contained in:
parent
13d3cc3306
commit
9f893e68e9
9 changed files with 57 additions and 7 deletions
|
@ -115,6 +115,10 @@ public final class Economy
|
|||
{
|
||||
throw new UserDoesNotExistException(name);
|
||||
}
|
||||
if (balance < ess.getSettings().getMinMoney())
|
||||
{
|
||||
throw new NoLoanPermittedException();
|
||||
}
|
||||
if (balance < 0.0 && !user.isAuthorized("essentials.eco.loan"))
|
||||
{
|
||||
throw new NoLoanPermittedException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue