Package wtf.ranked.hytale.server.runner
Class HytalePluginExtension
java.lang.Object
wtf.ranked.hytale.server.runner.HytalePluginExtension
- All Implemented Interfaces:
Serializable
Main configuration extension for the Hytale Boot plugin.
Defines paths for the server environment, download locations, and JVM arguments required to boot the server.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHytalePluginExtension(org.gradle.api.Project project, org.gradle.api.file.ProjectLayout layout) Constructs a new HytalePluginExtension and sets default conventions. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the name of the prerequisite build task using a string identifier.voidenvironment(String identifier, Object value) Adds an environment variable to the server process.abstract org.gradle.api.file.RegularFilePropertyFile property for the server assets archive.abstract org.gradle.api.provider.ListProperty<String> The names of the tasks that must be completed before the server runs.abstract org.gradle.api.provider.Property<Duration> The maximum amount of time allowed for download operations.abstract org.gradle.api.file.DirectoryPropertyDirectory where server mods will be installed.abstract ModExtensionAccesses the nested configuration for server mods.abstract org.gradle.api.provider.Property<Patchline> Returns the targeted patchline (e.g., RELEASE, SNAPSHOT) for the server.abstract org.gradle.api.file.DirectoryPropertyRoot directory for server execution.abstract org.gradle.api.provider.Property<InetSocketAddress> The InetSocketAddress to which the server will be bound.abstract org.gradle.api.file.DirectoryPropertyDirectory where the Hytale server files are located.abstract org.gradle.api.provider.Property<URI> URI used to download the server software.Map of environment variables passed to the server process.abstract org.gradle.api.file.RegularFilePropertyThe primary executable JAR file for the server.abstract org.gradle.api.provider.Property<String> The entry point class name for the Hytale server.abstract org.gradle.api.provider.ListProperty<String> List of JVM arguments to pass to the server process.abstract org.gradle.api.provider.Property<OnlineMode> Property which allows to change the server online mode.voidmods(org.gradle.api.Action<? super ModExtension> action) Configures the server mods via an action.voidserverAddress(String host, int port) Sets the network address and port for the Hytale server.
-
Constructor Details
-
HytalePluginExtension
@Inject public HytalePluginExtension(org.gradle.api.Project project, org.gradle.api.file.ProjectLayout layout) Constructs a new HytalePluginExtension and sets default conventions.- Parameters:
layout- the Gradle project layout used to resolve default paths
-
-
Method Details
-
mods
Configures the server mods via an action.- Parameters:
action- configuration block for mods
-
environment
Adds an environment variable to the server process.- Parameters:
identifier- variable namevalue- variable value
-
dependsOn
Adds the name of the prerequisite build task using a string identifier.- Parameters:
taskName- the name of the task to depend on (e.g., "assemble")
-
serverAddress
Sets the network address and port for the Hytale server.This is a convenience method that creates an
InetSocketAddressand updates thegetServerAddress()property.- Parameters:
host- the hostname or IP address to bind to (e.g., "0.0.0.0")port- the port number (e.g., 5520)
-
getModExtension
Accesses the nested configuration for server mods.- Returns:
- the nested mod configuration extension
-
getServerEnvironment
Map of environment variables passed to the server process.- Returns:
- the property containing environment variables
-
getServerDirectory
public abstract org.gradle.api.file.DirectoryProperty getServerDirectory()Directory where the Hytale server files are located.- Returns:
- the property containing the server directory
-
getRunDirectory
public abstract org.gradle.api.file.DirectoryProperty getRunDirectory()Root directory for server execution.- Returns:
- the property containing the run directory
-
getModDirectory
public abstract org.gradle.api.file.DirectoryProperty getModDirectory()Directory where server mods will be installed.- Returns:
- the property containing the mods directory
-
getAssets
public abstract org.gradle.api.file.RegularFileProperty getAssets()File property for the server assets archive.- Returns:
- the property containing the assets file
-
getServerDownloadUri
URI used to download the server software.- Returns:
- the property containing the server download URI
-
getServerJar
public abstract org.gradle.api.file.RegularFileProperty getServerJar()The primary executable JAR file for the server.- Returns:
- the property containing the server JAR file
-
getServerJarMainClass
The entry point class name for the Hytale server.- Returns:
- the property containing the server main class name
-
getServerJvmArgs
List of JVM arguments to pass to the server process.- Returns:
- the property containing the list of JVM arguments
-
getServerOnlineMode
Property which allows to change the server online mode.- Returns:
- the property containing the server online mode
-
getServerAddress
The InetSocketAddress to which the server will be bound.- Returns:
- the property containing the server bind address
-
getDownloadTimeout
The maximum amount of time allowed for download operations.This timeout is applied when downloading server software or assets to prevent the build process from hanging indefinitely due to network issues.
- Returns:
- the property containing the download timeout duration
-
getDependsOn
The names of the tasks that must be completed before the server runs.These properties define dependencies for the server execution pipeline. Usually, this includes tasks like
jarorshadowJarto ensure that the latest version of the project is compiled and packaged before the server starts.- Returns:
- the property containing the list of prerequisite build tasks
-
getPatchline
Returns the targeted patchline (e.g., RELEASE, SNAPSHOT) for the server.- Returns:
- a property containing the
Patchline
-