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.Named;
|
||||||
import com.massivecraft.massivecore.collections.MassiveList;
|
import com.massivecraft.massivecore.collections.MassiveList;
|
||||||
import com.massivecraft.massivecore.collections.MassiveMapDef;
|
import com.massivecraft.massivecore.collections.MassiveMapDef;
|
||||||
|
import com.massivecraft.massivecore.collections.MassiveSet;
|
||||||
import com.massivecraft.massivecore.collections.MassiveTreeSetDef;
|
import com.massivecraft.massivecore.collections.MassiveTreeSetDef;
|
||||||
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
|
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
|
||||||
import com.massivecraft.massivecore.mixin.MixinMessage;
|
import com.massivecraft.massivecore.mixin.MixinMessage;
|
||||||
@ -1008,7 +1009,8 @@ public class Faction extends Entity<Faction> implements EconomyParticipator, Nam
|
|||||||
// FOREIGN KEY: MPLAYER
|
// FOREIGN KEY: MPLAYER
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
protected transient List<MPlayer> mplayers = new ArrayList<MPlayer>();
|
protected transient Set<MPlayer> mplayers = new MassiveSet<MPlayer>();
|
||||||
|
|
||||||
public void reindexMPlayers()
|
public void reindexMPlayers()
|
||||||
{
|
{
|
||||||
this.mplayers.clear();
|
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)
|
if (mplayer != null)
|
||||||
{
|
{
|
||||||
Faction before = mplayer.getFaction();
|
String beforeId = mplayer.getFactionId();
|
||||||
Faction after = null;
|
String afterId = null;
|
||||||
mplayer.updateFactionIndexes(before, after);
|
mplayer.updateFactionIndexes(beforeId, afterId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.removeAtLocalFixed(id);
|
return super.removeAtLocalFixed(id);
|
||||||
@ -63,20 +63,20 @@ public class MPlayerColl extends SenderColl<MPlayer>
|
|||||||
MPlayer mplayer = null;
|
MPlayer mplayer = null;
|
||||||
|
|
||||||
// Before
|
// Before
|
||||||
Faction before = null;
|
String beforeId = null;
|
||||||
if (mplayer == null) mplayer = this.id2entity.get(id);
|
if (mplayer == null) mplayer = this.id2entity.get(id);
|
||||||
if (mplayer != null) before = mplayer.getFaction();
|
if (mplayer != null) beforeId = mplayer.getFactionId();
|
||||||
|
|
||||||
// Super
|
// Super
|
||||||
super.loadFromRemoteFixed(id, remoteEntry);
|
super.loadFromRemoteFixed(id, remoteEntry);
|
||||||
|
|
||||||
// After
|
// After
|
||||||
Faction after = null;
|
String afterId = null;
|
||||||
if (mplayer == null) mplayer = this.id2entity.get(id);
|
if (mplayer == null) mplayer = this.id2entity.get(id);
|
||||||
if (mplayer != null) after = mplayer.getFaction();
|
if (mplayer != null) afterId = mplayer.getFactionId();
|
||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
if (mplayer != null) mplayer.updateFactionIndexes(before, after);
|
if (mplayer != null) mplayer.updateFactionIndexes(beforeId, afterId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user