2013-04-19 18:34:21 +02:00
|
|
|
package com.massivecraft.factions;
|
|
|
|
|
2013-04-22 09:37:53 +02:00
|
|
|
import com.massivecraft.factions.entity.Faction;
|
2014-06-04 14:02:23 +02:00
|
|
|
import com.massivecraft.massivecore.util.extractor.Extractor;
|
2013-04-19 18:34:21 +02:00
|
|
|
|
|
|
|
public class ExtractorFactionAccountId implements Extractor
|
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INSTANCE & CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
private static ExtractorFactionAccountId i = new ExtractorFactionAccountId();
|
|
|
|
public static ExtractorFactionAccountId get() { return i; }
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// OVERRIDE: EXTRACTOR
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Object extract(Object o)
|
|
|
|
{
|
|
|
|
if (o instanceof Faction)
|
|
|
|
{
|
|
|
|
String factionId = ((Faction)o).getId();
|
|
|
|
if (factionId == null) return null;
|
2013-12-03 17:16:41 +01:00
|
|
|
return Factions.FACTION_MONEY_ACCOUNT_ID_PREFIX + factionId;
|
2013-04-19 18:34:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|