Previous commit gave duplicates. Lets try this.
This commit is contained in:
parent
6599aac488
commit
3bd67f5029
@ -29,6 +29,7 @@ import com.massivecraft.factions.util.RelationUtil;
|
||||
import com.massivecraft.massivecore.Named;
|
||||
import com.massivecraft.massivecore.collections.MassiveList;
|
||||
import com.massivecraft.massivecore.collections.MassiveMapDef;
|
||||
import com.massivecraft.massivecore.collections.MassiveSet;
|
||||
import com.massivecraft.massivecore.collections.MassiveTreeSetDef;
|
||||
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
|
||||
import com.massivecraft.massivecore.mixin.MixinMessage;
|
||||
@ -1008,7 +1009,8 @@ public class Faction extends Entity<Faction> implements EconomyParticipator, Nam
|
||||
// FOREIGN KEY: MPLAYER
|
||||
// -------------------------------------------- //
|
||||
|
||||
protected transient List<MPlayer> mplayers = new ArrayList<MPlayer>();
|
||||
protected transient Set<MPlayer> mplayers = new MassiveSet<MPlayer>();
|
||||
|
||||
public void reindexMPlayers()
|
||||
{
|
||||
this.mplayers.clear();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -43,9 +43,9 @@ public class MPlayerColl extends SenderColl<MPlayer>
|
||||
|
||||
if (mplayer != null)
|
||||
{
|
||||
Faction before = mplayer.getFaction();
|
||||
Faction after = null;
|
||||
mplayer.updateFactionIndexes(before, after);
|
||||
String beforeId = mplayer.getFactionId();
|
||||
String afterId = null;
|
||||
mplayer.updateFactionIndexes(beforeId, afterId);
|
||||
}
|
||||
|
||||
return super.removeAtLocalFixed(id);
|
||||
@ -63,20 +63,20 @@ public class MPlayerColl extends SenderColl<MPlayer>
|
||||
MPlayer mplayer = null;
|
||||
|
||||
// Before
|
||||
Faction before = null;
|
||||
String beforeId = null;
|
||||
if (mplayer == null) mplayer = this.id2entity.get(id);
|
||||
if (mplayer != null) before = mplayer.getFaction();
|
||||
if (mplayer != null) beforeId = mplayer.getFactionId();
|
||||
|
||||
// Super
|
||||
super.loadFromRemoteFixed(id, remoteEntry);
|
||||
|
||||
// After
|
||||
Faction after = null;
|
||||
String afterId = null;
|
||||
if (mplayer == null) mplayer = this.id2entity.get(id);
|
||||
if (mplayer != null) after = mplayer.getFaction();
|
||||
if (mplayer != null) afterId = mplayer.getFactionId();
|
||||
|
||||
// Perform
|
||||
if (mplayer != null) mplayer.updateFactionIndexes(before, after);
|
||||
if (mplayer != null) mplayer.updateFactionIndexes(beforeId, afterId);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user