Call changed() more often

This commit is contained in:
BuildTools
2015-11-08 17:59:32 +01:00
committed by Olof Larsson
parent 18f4dd3bf2
commit 1c6f3f28d1
4 changed files with 14 additions and 3 deletions

View File

@ -868,17 +868,20 @@ public class Faction extends Entity<Faction> implements EconomyParticipator, Nam
Map<MPerm, Set<Rel>> perms = this.getPerms();
Set<Rel> rels = perms.get(perm);
boolean changed;
if (permitted)
{
rels.add(rel);
changed = rels.add(rel);
}
else
{
rels.remove(rel);
changed = rels.remove(rel);
}
this.setPerms(perms);
if (changed) this.changed();
}
// -------------------------------------------- //