mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
[Breaking] Add exception when players have exceeded their account limit.
This might effect some plugins which hook Essentials for economy without using the API
This commit is contained in:
parent
161862bc53
commit
882ebae257
38 changed files with 151 additions and 83 deletions
|
@ -21,6 +21,7 @@ import java.math.MathContext;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.ess3.api.IEssentials;
|
||||
import net.ess3.api.MaxMoneyException;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -146,7 +147,14 @@ public class Economy
|
|||
{
|
||||
throw new NoLoanPermittedException();
|
||||
}
|
||||
user.setMoney(balance);
|
||||
try
|
||||
{
|
||||
user.setMoney(balance);
|
||||
}
|
||||
catch (MaxMoneyException ex)
|
||||
{
|
||||
//TODO: Update API to show max balance errors
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue