mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-20 15:35:08 +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
|
@ -94,6 +94,11 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||||
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