mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 05:01:28 +00:00
Do not apply starting balance for NPCs. Resolves #191
NPC balances are usually banks e.g. Factions plugin depending on EssentialsEco to provide economy functionality for the Faction.
This commit is contained in:
parent
e95fad0453
commit
d174cea42e
1 changed files with 5 additions and 0 deletions
|
@ -93,6 +93,11 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
BigDecimal result = ess.getSettings().getStartingBalance();
|
||||
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
|
||||
BigDecimal minMoney = ess.getSettings().getMinMoney();
|
||||
|
||||
// NPC banks are not actual player banks, as such they do not have player starting balance.
|
||||
if (isNPC()) {
|
||||
result = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
if (config.hasProperty("money")) {
|
||||
result = config.getBigDecimal("money", result);
|
||||
|
|
Loading…
Reference in a new issue