EssentialsX

EssentialsX

2M Downloads

EssentialsX displaying factions from factionsuuid in baltop

xXBarchticXx opened this issue ยท 8 comments

commented

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

commented

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'
commented

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.

https://github.com/drtshock/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java#L97-L106

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);
  }
}
commented

Can confirm

commented

Any updates @drtshock?

commented

Hello...

commented

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.

commented

Will a fix be implemented?

commented

This was fixed (a long time ago!) by d0760dd.