public class Mods
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,FreeColModFile> |
allMods
A cache of all the mods.
|
private static java.util.logging.Logger |
logger |
Constructor and Description |
---|
Mods() |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<FreeColModFile> |
getAllMods()
Gets all available mods.
|
static FreeColModFile |
getFreeColModFile(java.lang.String id)
Get a mod by id.
|
static FreeColModFile |
getModFile(java.lang.String id)
Gets the mod with the given object identifier.
|
static java.util.List<FreeColTcFile> |
getRuleSets()
Gets all available rulesets.
|
private static void |
loadModDirectory(java.io.File directory)
Loads all valid mods from a specified directory.
|
static void |
loadMods()
Require all mods to be loaded.
|
private static final java.util.logging.Logger logger
private static final java.util.Map<java.lang.String,FreeColModFile> allMods
private static void loadModDirectory(java.io.File directory)
directory
- The directory to load from.public static void loadMods()
public static FreeColModFile getModFile(java.lang.String id)
id
- The identifier of the mod to search for.FreeColModFile
for the mod, or null if
not found.public static java.util.Collection<FreeColModFile> getAllMods()
FreeColModFile
s contain mods.public static FreeColModFile getFreeColModFile(java.lang.String id)
id
- The mod file identifier to look for.FreeColModFile
found, or null if none present.public static java.util.List<FreeColTcFile> getRuleSets()
FreeColModFile
s containing rulesets.