EssentialsX displaying factions from factionsuuid in baltop
xXBarchticXx opened this issue ยท 8 comments
Hello, essentialsx is conflicting with factionsuuid causing the factions to be displayed with their bank balance eg. Faction_22: $180000. I am more then welcome to let you test it on my server as I can't take screenshots atm due to being on a phone
Since factions are registered as NPC's, maybe there can be a config option to hide NPC's from the baltop command.
npc: true
lastAccountName: faction_1
money: '0.0'
A possible solution would be to just add the check if the user is an NPC: user.isNPC()
I'm not sure if it would mess things up with other plugins, it might break more things than it fixes based on how ghetto people code their plugins nowadays. ๐
If anyone wants to fix it in their own forks, this is probably the simplest way. hehe.
for (UUID u : ess.getUserMap().getAllUniqueUsers()) {
final User user = ess.getUserMap().getUser(u);
if (user != null) {
final BigDecimal userMoney = user.getMoney();
user.updateMoneyCache(userMoney);
totalMoney = totalMoney.add(userMoney);
final String name = user.isHidden() ? user.getName() : user.getDisplayName();
balances.put(name, userMoney);
}
}
Any updates @drtshock?
Looked into this and factions is registering factions as accounts with the economy plugin and essentials is somehow thinking that the faction is an actual player.
This was fixed (a long time ago!) by d0760dd.