package com.massivecraft.factions.cmd.arg; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.bukkit.command.CommandSender; import com.massivecraft.factions.FFlag; import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect; import com.massivecraft.massivecore.util.Txt; public class ARFFlag extends ARAbstractSelect { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // private static ARFFlag i = new ARFFlag(); public static ARFFlag get() { return i; } // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // @Override public String typename() { return "faction flag"; } @Override public FFlag select(String str, CommandSender sender) { return FFlag.parse(str); } @Override public Collection altNames(CommandSender sender) { List ret = new ArrayList(); for (FFlag fflag : FFlag.values()) { ret.add(Txt.getNicedEnum(fflag)); } return ret; } }