Call changed() more often
This commit is contained in:
parent
18f4dd3bf2
commit
1c6f3f28d1
@ -72,6 +72,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand
|
||||
|
||||
// Apply
|
||||
msenderFaction.setInvited(mplayer, true);
|
||||
msenderFaction.changed();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -109,6 +109,9 @@ public class CmdFactionsInviteRemove extends FactionsCommand
|
||||
|
||||
// Apply
|
||||
msenderFaction.setInvited(mplayer, false);
|
||||
|
||||
// If all, we do this at last. So we only do it once.
|
||||
if (! all) msenderFaction.changed();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -143,6 +146,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand
|
||||
);
|
||||
|
||||
msenderFaction.sendMessage(factionsRevokeAll);
|
||||
msenderFaction.changed();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,9 @@ public abstract class CmdFactionsRelationAbstract extends FactionsCommand
|
||||
otherFaction.msg("<i>This will have no effect while their faction is peaceful.");
|
||||
msenderFaction.msg("<i>This will have no effect while your faction is peaceful.");
|
||||
}
|
||||
|
||||
// Mark as changed
|
||||
msenderFaction.changed();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -869,16 +869,19 @@ public class Faction extends Entity<Faction> implements EconomyParticipator, Nam
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user