Saber-Factions/src/main/java/com/massivecraft/factions/Factions.java

56 lines
1.3 KiB
Java
Raw Normal View History

package com.massivecraft.factions;
2014-11-06 01:36:47 +01:00
import com.massivecraft.factions.zcore.persist.json.JSONFactions;
2014-04-04 20:55:21 +02:00
import java.util.ArrayList;
import java.util.Set;
public abstract class Factions {
protected static Factions instance = getFactionsImpl();
2018-07-12 18:11:07 +02:00
public static Factions getInstance() {
return instance;
}
private static Factions getFactionsImpl() {
switch (Conf.backEnd) {
case JSON:
return new JSONFactions();
}
return null;
}
public abstract Faction getFactionById(String id);
2014-04-04 20:55:21 +02:00
public abstract Faction getByTag(String str);
2014-04-04 20:55:21 +02:00
public abstract Faction getBestTagMatch(String start);
2014-04-04 20:55:21 +02:00
public abstract boolean isTagTaken(String str);
2014-04-04 20:55:21 +02:00
public abstract boolean isValidFactionId(String id);
2014-04-04 20:55:21 +02:00
public abstract Faction createFaction();
2014-04-04 20:55:21 +02:00
public abstract void removeFaction(String id);
2014-04-04 20:55:21 +02:00
public abstract Set<String> getFactionTags();
2014-04-04 20:55:21 +02:00
public abstract ArrayList<Faction> getAllFactions();
2014-04-04 20:55:21 +02:00
@Deprecated
public abstract Faction getNone();
2014-04-04 20:55:21 +02:00
public abstract Faction getWilderness();
public abstract Faction getSafeZone();
2014-04-04 20:55:21 +02:00
public abstract Faction getWarZone();
2014-04-04 20:55:21 +02:00
public abstract void forceSave();
2014-04-04 20:55:21 +02:00
public abstract void forceSave(boolean sync);
public abstract void load();
}