mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-18 22:49:45 +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 result = ess.getSettings().getStartingBalance();
|
||||||
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
|
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
|
||||||
BigDecimal minMoney = ess.getSettings().getMinMoney();
|
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")) {
|
if (config.hasProperty("money")) {
|
||||||
result = config.getBigDecimal("money", result);
|
result = config.getBigDecimal("money", result);
|
||||||
|
|
Loading…
Reference in a new issue