public final class ForgeMeta
extends java.lang.Object
| Constructor and Description |
|---|
ForgeMeta(@NotNull java.io.File forgeManifest,
@NotNull Utilities utilities)
Create a new Forge Meta, using a manifest file.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.List<java.lang.String> |
forgeVersionsAscending()
Get the list of available Forge versions, in ascending order.
|
@NotNull java.lang.String[] |
forgeVersionsAscendingArray()
Get the array of available Forge versions, in ascending order.
|
@NotNull java.util.List<java.lang.String> |
forgeVersionsDescending()
Get the list of available Forge versions, in descending order.
|
@NotNull java.lang.String[] |
forgeVersionsDescendingArray()
Get the array of available Forge versions, in descending order.
|
@NotNull java.util.Optional<ForgeInstance> |
getForgeInstance(@NotNull java.lang.String forgeVersion)
Get a
ForgeInstance for a given Forge version, wrapped in an Optional. |
@NotNull java.util.Optional<ForgeInstance> |
getForgeInstance(@NotNull java.lang.String minecraftVersion,
@NotNull java.lang.String forgeVersion)
Get a
ForgeInstance for a given Minecraft and Forge version, wrapped in an
Optional. |
@NotNull java.util.Optional<java.util.List<ForgeInstance>> |
getForgeInstances(@NotNull java.lang.String minecraftVersion)
Get a list of all available
ForgeInstance for a given Minecraft version, wrapped in an
Optional |
void |
initialize(@NotNull MinecraftMeta injectedMinecraftMeta)
Update this instances
ForgeLoader with new information. |
@NotNull java.util.Optional<java.net.URL> |
installerUrl(@NotNull java.lang.String forgeVersion)
Get the Forge server installer URL for a given Forge version, wrapped in an
Optional. |
boolean |
isForgeAndMinecraftCombinationValid(@NotNull java.lang.String minecraftVersion,
@NotNull java.lang.String forgeVersion)
Check whether the given Minecraft and Forge versions are valid/supported/available.
|
boolean |
isForgeInstanceAvailable(@NotNull java.lang.String forgeVersion)
Check whether Forge is available for a given Forge version
|
boolean |
isForgeInstanceAvailable(@NotNull java.lang.String minecraftVersion,
@NotNull java.lang.String forgeVersion)
Check whether Forge is available for a given Forge- and Minecraft version.
|
boolean |
isForgeVersionValid(@NotNull java.lang.String forgeVersion)
Check whether a given Forge version is valid/supported/available.
|
boolean |
isMinecraftVersionSupported(@NotNull java.lang.String minecraftVersion)
Check whether a given Minecraft version is valid/supported/available.
|
@NotNull java.util.Optional<java.lang.String> |
minecraftVersion(@NotNull java.lang.String forgeVersion)
Get the Minecraft version for a given Forge version, wrapped in an
Optional. |
@NotNull java.util.Optional<java.lang.String> |
newestForgeVersion(@NotNull java.lang.String minecraftVersion)
Latest Forge version for a given Minecraft version, wrapped in
Optional |
@NotNull java.util.Optional<java.lang.String> |
oldestForgeVersion(@NotNull java.lang.String minecraftVersion)
Oldest Forge version for a given Minecraft version, wrapped in
Optional |
@NotNull java.util.Optional<java.util.List<java.lang.String>> |
supportedForgeVersionsAscending(@NotNull java.lang.String minecraftVersion)
Get a list of available Forge version for a given Minecraft version in ascending order.
|
@NotNull java.util.Optional<java.lang.String[]> |
supportedForgeVersionsAscendingArray(@NotNull java.lang.String minecraftVersion)
Get an array of available Forge version for a given Minecraft version, in ascending order,
wrapped in an
Optional. |
@NotNull java.util.Optional<java.util.List<java.lang.String>> |
supportedForgeVersionsDescending(@NotNull java.lang.String minecraftVersion)
Get a list of available Forge version for a given Minecraft version in descending order.
|
@NotNull java.util.Optional<java.lang.String[]> |
supportedForgeVersionsDescendingArray(@NotNull java.lang.String minecraftVersion)
Get an array of available Forge version for a given Minecraft version, in descending order,
wrapped in an
Optional. |
@NotNull java.util.List<java.lang.String> |
supportedMinecraftVersionsAscending()
Get the list of Forge supported Minecraft versions, in ascending order.
|
@NotNull java.lang.String[] |
supportedMinecraftVersionsAscendingArray()
Get the array of Forge supported Minecraft versions, in ascending order.
|
@NotNull java.util.List<java.lang.String> |
supportedMinecraftVersionsDescending()
Get the list of Forge supported Minecraft versions, in descending order.
|
@NotNull java.lang.String[] |
supportedMinecraftVersionsDescendingArray()
Get the array of Forge supported Minecraft versions, in descending order.
|
void |
update()
Update this instances
ForgeLoader with new information. |
@Contract(pure=true)
public ForgeMeta(@NotNull
@NotNull java.io.File forgeManifest,
@NotNull
@NotNull Utilities utilities)
forgeManifest - The manifest from which to acquire version information.utilities - Commonly used utilities across ServerPackCreator.public void initialize(@NotNull
@NotNull MinecraftMeta injectedMinecraftMeta)
throws java.io.IOException
ForgeLoader with new information. Usually called after the Forge
manifest has been refreshed.injectedMinecraftMeta - Minecraft manifest file.java.io.IOException - if the manifest could not be parsed into a
JsonNode.public void update()
throws java.io.IOException
ForgeLoader with new information. Usually called after the Forge
manifest has been refreshed.java.io.IOException - if the manifest could not be parsed into a
JsonNode.public boolean isForgeAndMinecraftCombinationValid(@NotNull
@NotNull java.lang.String minecraftVersion,
@NotNull
@NotNull java.lang.String forgeVersion)
minecraftVersion - Minecraft version.forgeVersion - Forge version.true if the given Minecraft and Forge versions are valid/supported/available.public boolean isMinecraftVersionSupported(@NotNull
@NotNull java.lang.String minecraftVersion)
minecraftVersion - Minecraft version.true if the given Minecraft version is valid/supported/available.public boolean isForgeVersionValid(@NotNull
@NotNull java.lang.String forgeVersion)
forgeVersion - Forge version.true if the given Forge version is valid/supported/available.public boolean isForgeInstanceAvailable(@NotNull
@NotNull java.lang.String minecraftVersion,
@NotNull
@NotNull java.lang.String forgeVersion)
minecraftVersion - Minecraft version.forgeVersion - Forge version.true if Forge is available for the given Forge- and Minecraft version.@NotNull public @NotNull java.util.Optional<ForgeInstance> getForgeInstance(@NotNull @NotNull java.lang.String minecraftVersion, @NotNull @NotNull java.lang.String forgeVersion)
ForgeInstance for a given Minecraft and Forge version, wrapped in an
Optional.minecraftVersion - Minecraft version.forgeVersion - Forge version.Optionalpublic boolean isForgeInstanceAvailable(@NotNull
@NotNull java.lang.String forgeVersion)
forgeVersion - Forge version.true if Forge is available for the given Forge version.@NotNull public @NotNull java.util.Optional<ForgeInstance> getForgeInstance(@NotNull @NotNull java.lang.String forgeVersion)
ForgeInstance for a given Forge version, wrapped in an Optional.forgeVersion - Forge version.Optional@NotNull public @NotNull java.util.Optional<java.util.List<ForgeInstance>> getForgeInstances(@NotNull @NotNull java.lang.String minecraftVersion)
ForgeInstance for a given Minecraft version, wrapped in an
OptionalminecraftVersion - Minecraft version.@NotNull
public @NotNull java.util.Optional<java.lang.String> newestForgeVersion(@NotNull
@NotNull java.lang.String minecraftVersion)
OptionalminecraftVersion - Minecraft version.Optional@NotNull
public @NotNull java.util.Optional<java.lang.String> oldestForgeVersion(@NotNull
@NotNull java.lang.String minecraftVersion)
OptionalminecraftVersion - Minecraft version.Optional@NotNull public @NotNull java.util.List<java.lang.String> forgeVersionsAscending()
@NotNull public @NotNull java.util.List<java.lang.String> forgeVersionsDescending()
@NotNull public @NotNull java.lang.String[] forgeVersionsAscendingArray()
@NotNull public @NotNull java.lang.String[] forgeVersionsDescendingArray()
@NotNull
public @NotNull java.util.Optional<java.util.List<java.lang.String>> supportedForgeVersionsAscending(@NotNull
@NotNull java.lang.String minecraftVersion)
minecraftVersion - Minecraft version.@NotNull
public @NotNull java.util.Optional<java.util.List<java.lang.String>> supportedForgeVersionsDescending(@NotNull
@NotNull java.lang.String minecraftVersion)
minecraftVersion - Minecraft version.@NotNull
public @NotNull java.util.Optional<java.lang.String[]> supportedForgeVersionsAscendingArray(@NotNull
@NotNull java.lang.String minecraftVersion)
Optional.minecraftVersion - Minecraft version.Optional@NotNull
public @NotNull java.util.Optional<java.lang.String[]> supportedForgeVersionsDescendingArray(@NotNull
@NotNull java.lang.String minecraftVersion)
Optional.minecraftVersion - Minecraft version.Optional@NotNull
public @NotNull java.util.Optional<java.lang.String> minecraftVersion(@NotNull
@NotNull java.lang.String forgeVersion)
Optional.forgeVersion - Forge version.Optional.@Contract(pure=true) @NotNull public @NotNull java.util.List<java.lang.String> supportedMinecraftVersionsAscending()
@NotNull public @NotNull java.util.List<java.lang.String> supportedMinecraftVersionsDescending()
@NotNull public @NotNull java.lang.String[] supportedMinecraftVersionsAscendingArray()
@NotNull public @NotNull java.lang.String[] supportedMinecraftVersionsDescendingArray()
@NotNull
public @NotNull java.util.Optional<java.net.URL> installerUrl(@NotNull
@NotNull java.lang.String forgeVersion)
Optional.forgeVersion - Forge version.Optional.