From 352db6485070ce6bdb554c541ebb483dae110441 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sun, 8 Nov 2015 19:07:13 +0100 Subject: [PATCH] MassiveCore Change --- .../factions/cmd/type/TypeSortMPlayer.java | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java b/src/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java index 019a3252..34ba3da5 100644 --- a/src/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java +++ b/src/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java @@ -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> @@ -18,6 +16,14 @@ public class TypeSortMPlayer extends TypeAbstractChoice> 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> { return "player sorter"; } - - @SuppressWarnings("unchecked") - @Override - public Collection> getAll() - { - return new MassiveList>( - PlayerRoleComparator.get(), - PlayerPowerComparator.get(), - PlayerInactivityComparator.get() - ); - } - - }