MassiveCore Change
This commit is contained in:
parent
1c6f3f28d1
commit
352db64850
@ -1,13 +1,11 @@
|
||||
package com.massivecraft.factions.cmd.type;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.massivecraft.factions.PlayerInactivityComparator;
|
||||
import com.massivecraft.factions.PlayerPowerComparator;
|
||||
import com.massivecraft.factions.PlayerRoleComparator;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.massivecore.collections.MassiveList;
|
||||
import com.massivecraft.massivecore.command.type.TypeAbstractChoice;
|
||||
|
||||
public class TypeSortMPlayer extends TypeAbstractChoice<Comparator<MPlayer>>
|
||||
@ -18,6 +16,14 @@ public class TypeSortMPlayer extends TypeAbstractChoice<Comparator<MPlayer>>
|
||||
|
||||
private static TypeSortMPlayer i = new TypeSortMPlayer();
|
||||
public static TypeSortMPlayer get() { return i; }
|
||||
public TypeSortMPlayer()
|
||||
{
|
||||
this.setAll(
|
||||
PlayerRoleComparator.get(),
|
||||
PlayerPowerComparator.get(),
|
||||
PlayerInactivityComparator.get()
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
@ -28,18 +34,5 @@ public class TypeSortMPlayer extends TypeAbstractChoice<Comparator<MPlayer>>
|
||||
{
|
||||
return "player sorter";
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Collection<Comparator<MPlayer>> getAll()
|
||||
{
|
||||
return new MassiveList<Comparator<MPlayer>>(
|
||||
PlayerRoleComparator.get(),
|
||||
PlayerPowerComparator.get(),
|
||||
PlayerInactivityComparator.get()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user