New getAll methods.

This commit is contained in:
Olof Larsson 2015-08-03 16:17:38 +02:00
parent 4a18daf2d9
commit 0642b0ede4
5 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,7 @@ public class CmdFactionsList extends FactionsCommand
public void run()
{
// Create Pager
final List<Faction> factions = FactionColl.get().getAll(null, FactionListComparator.get());
final List<Faction> factions = FactionColl.get().getAll(FactionListComparator.get());
final PagerSimple<Faction> pager = new PagerSimple<Faction>(factions, sender);
// Use Pager

View File

@ -5,6 +5,7 @@ import java.util.List;
import com.massivecraft.factions.event.EventFactionsCreateFlags;
import com.massivecraft.massivecore.PredictateIsRegistered;
import com.massivecraft.massivecore.Prioritized;
import com.massivecraft.massivecore.PriorityComparator;
import com.massivecraft.massivecore.Registerable;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.store.Entity;
@ -60,7 +61,7 @@ public class MFlag extends Entity<MFlag> implements Prioritized, Registerable
{
setupStandardFlags();
new EventFactionsCreateFlags(isAsync).run();
return MFlagColl.get().getAll(PredictateIsRegistered.get());
return MFlagColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
}
public static void setupStandardFlags()

View File

@ -5,7 +5,6 @@ import java.util.List;
import com.massivecraft.factions.Const;
import com.massivecraft.factions.Factions;
import com.massivecraft.massivecore.PriorityComparator;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
@ -19,7 +18,7 @@ public class MFlagColl extends Coll<MFlag>
public static MFlagColl get() { return i; }
private MFlagColl()
{
super(Const.COLLECTION_MFLAG, MFlag.class, MStore.getDb(), Factions.get(), false, true, null, PriorityComparator.get());
super(Const.COLLECTION_MFLAG, MFlag.class, MStore.getDb(), Factions.get(), false, true);
}
// -------------------------------------------- //

View File

@ -14,6 +14,7 @@ import com.massivecraft.factions.TerritoryAccess;
import com.massivecraft.factions.event.EventFactionsCreatePerms;
import com.massivecraft.massivecore.PredictateIsRegistered;
import com.massivecraft.massivecore.Prioritized;
import com.massivecraft.massivecore.PriorityComparator;
import com.massivecraft.massivecore.Registerable;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.store.Entity;
@ -97,7 +98,7 @@ public class MPerm extends Entity<MPerm> implements Prioritized, Registerable
setupStandardPerms();
new EventFactionsCreatePerms().run();
return MPermColl.get().getAll(PredictateIsRegistered.get());
return MPermColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
}
public static void setupStandardPerms()

View File

@ -5,7 +5,6 @@ import java.util.List;
import com.massivecraft.factions.Const;
import com.massivecraft.factions.Factions;
import com.massivecraft.massivecore.PriorityComparator;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
@ -19,7 +18,7 @@ public class MPermColl extends Coll<MPerm>
public static MPermColl get() { return i; }
private MPermColl()
{
super(Const.COLLECTION_MPERM, MPerm.class, MStore.getDb(), Factions.get(), false, true, null, PriorityComparator.get());
super(Const.COLLECTION_MPERM, MPerm.class, MStore.getDb(), Factions.get(), false, true);
}
// -------------------------------------------- //