RuleControlledResourceContainerpublic class Version extends Object implements RuleControlledResourceContainer
| Modifier | Constructor | Description |
|---|---|---|
|
Version(String id,
int minimumLauncherVersion,
VersionType type,
OffsetDateTime releaseTime,
OffsetDateTime modificationTime,
String mainClass,
List<ProgramArgument> gameArguments,
List<ProgramArgument> jvmArguments,
Download clientDownload,
Download serverDownload,
Download windowsServerDownload,
String assets,
AssetIndexReference assetIndex,
Set<LibraryReference> libraries,
LoggerConfiguration clientLoggerConfiguration) |
|
protected |
Version(String id,
int minimumLauncherVersion,
VersionType type,
OffsetDateTime releaseTime,
OffsetDateTime modificationTime,
String mainClass,
Map<String,List<ProgramArgument>> arguments,
Map<String,Download> downloads,
String assets,
AssetIndexReference assetIndex,
Set<LibraryReference> libraries,
Map<String,LoggerConfiguration> loggerConfigurations,
String legacyArguments) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object o) |
|
AssetIndexReference |
getAssetIndex() |
Retrieves the location, size, checksum and total asset size for the asset index used by this
game version.
|
String |
getAssets() |
Retrieves the asset revision on which the client of this game version relies upon.
|
Download |
getClientDownload() |
Retrieves the location, size and checksum for the client archive for this version.
|
Optional<LoggerConfiguration> |
getClientLoggerConfiguration() |
Retrieves the logger configuration for this client version.
|
List<ProgramArgument> |
getGameArguments() |
Retrieves a list of potential game arguments which are to be passed to the client executable
when launching the game.
|
String |
getId() |
Retrieves a globally unique identifier for this version.
|
List<ProgramArgument> |
getJvmArguments() |
Retrieves a list of potential JVM arguments which are to be passed to the Java executable
when launching the game (only applies to the client).
|
Set<LibraryReference> |
getLibraries() |
Retrieves a set of libraries on which this game version relies.
|
Optional<LibraryReference> |
getLibrary(String name) |
Retrieves a specific library based on its name from within this version's dependencies.
|
String |
getMainClass() |
Retrieves the class which contains the client's main method.
|
int |
getMinimumLauncherVersion() |
Retrieves the minimum required launcher specification which is required to be supported in
order to download and run this version.
|
OffsetDateTime |
getModificationTime() |
Retrieves the time at which this manifest was last modified.
|
OffsetDateTime |
getReleaseTime() |
Retrieves the time at which this version has originally been released.
|
Optional<Download> |
getServerDownload() |
Retrieves the location, size and checksum for the server archive for this version.
|
VersionType |
getType() |
Retrieves the type and stability of this particular version.
|
Optional<Download> |
getWindowsServerDownload() |
Retrieves the location, size and checksum for the Windows server executable for this
version.
|
int |
hashCode() |
|
static Version |
read(InputStream inputStream) |
Decodes a version manifest from the specified input stream.
|
static Version |
read(Reader reader) |
Decodes a version manifest from the specified reader.
|
static Version |
read(Path path) |
Decodes a version manifest from the specified file.
|
Version |
reduce(ResolverContext ctx) |
Reduces the values within this container to the set of elements which match the specified
context.
|
public Version(@NonNull
String id,
int minimumLauncherVersion,
@NonNull
VersionType type,
@NonNull
OffsetDateTime releaseTime,
@NonNull
OffsetDateTime modificationTime,
@NonNull
String mainClass,
@NonNull
List<ProgramArgument> gameArguments,
@NonNull
List<ProgramArgument> jvmArguments,
@NonNull
Download clientDownload,
@Nullable
Download serverDownload,
@Nullable
Download windowsServerDownload,
String assets,
@NonNull
AssetIndexReference assetIndex,
@NonNull
Set<LibraryReference> libraries,
@Nullable
LoggerConfiguration clientLoggerConfiguration)
protected Version(@NonNull
String id,
int minimumLauncherVersion,
@NonNull
VersionType type,
@NonNull
OffsetDateTime releaseTime,
@NonNull
OffsetDateTime modificationTime,
@NonNull
String mainClass,
@Nullable
Map<String,List<ProgramArgument>> arguments,
@NonNull
Map<String,Download> downloads,
@NonNull
String assets,
@NonNull
AssetIndexReference assetIndex,
@NonNull
Set<LibraryReference> libraries,
@Nullable
Map<String,LoggerConfiguration> loggerConfigurations,
@Nullable
String legacyArguments)
@NonNull public String getId()
public int getMinimumLauncherVersion()
@NonNull public VersionType getType()
@NonNull public OffsetDateTime getReleaseTime()
@NonNull public OffsetDateTime getModificationTime()
@NonNull public String getMainClass()
@NonNull public List<ProgramArgument> getGameArguments()
Retrieves a list of potential game arguments which are to be passed to the client executable when launching the game.
Note that these parameters may be tied to rules which evaluate whether and under which circumstances they are to be passed to the client.
@NonNull public List<ProgramArgument> getJvmArguments()
Retrieves a list of potential JVM arguments which are to be passed to the Java executable when launching the game (only applies to the client).
Note that these parameters may be tied to rules which evaluate whether and under which circumstances they are to be passed to the client.
@NonNull public Download getClientDownload()
@NonNull public Optional<Download> getServerDownload()
@NonNull public Optional<Download> getWindowsServerDownload()
Retrieves the location, size and checksum for the Windows server executable for this version.
Typically this will be a wrapper executable which contains an attached version of the standard dedicated server jar and may thus be used interchangeably with the standard jar on Windows machines.
@NonNull public String getAssets()
@NonNull public AssetIndexReference getAssetIndex()
@NonNull public Optional<LibraryReference> getLibrary(@NonNull String name)
name - a library name (including its version).@NonNull public Set<LibraryReference> getLibraries()
Retrieves a set of libraries on which this game version relies.
Note that these libraries typically only apply to the server archive as the required libraries are part of the server archive.
@NonNull public Optional<LoggerConfiguration> getClientLoggerConfiguration()
@NonNull public static Version read(@NonNull InputStream inputStream) throws IOException
inputStream - an input stream.IOException - when reading from the input stream fails or the data is malformed.@NonNull public static Version read(@NonNull Path path) throws IOException
path - a file path.IOException - when reading from the file fails or the data is malformed.@NonNull public static Version read(@NonNull Reader reader) throws IOException
reader - a reader.IOException - when reading from the file fails or the data is malformed.@NonNull public Version reduce(@NonNull ResolverContext ctx)
Reduces the values within this container to the set of elements which match the specified context.
This method returns a completely new instance of this container type with any elements which do not match the specified context removed.
reduce in interface RuleControlledResourceContainerctx - a resolver context.Copyright © 2018 Basin. All rights reserved.