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(@NonNull org.gradle.api.file.ProjectLayout layout) Constructs a new HytalePluginExtension and sets default conventions. -
Method Summary
Modifier and TypeMethodDescriptionvoiddependsOnBuildTask(@NonNull String taskName) voiddependsOnBuildTask(@NonNull TaskName taskName) voidenvironment(@NonNull String identifier, @NonNull Object value) Adds an environment variable to the server process.abstract @NonNull org.gradle.api.provider.Property<File> File property for the server assets archive.abstract @NonNull org.gradle.api.provider.Property<String> abstract @NonNull org.gradle.api.provider.Property<Duration> The maximum amount of time allowed for download operations.Map of environment variables passed to the server process.abstract @NonNull org.gradle.api.provider.ListProperty<String> List of JVM arguments to pass to the server process.abstract @NonNull org.gradle.api.file.DirectoryPropertyDirectory where server mods will be installed.abstract @NonNull ModExtensionAccesses the nested configuration for server mods.abstract @NonNull org.gradle.api.file.DirectoryPropertyRoot directory for server execution.abstract @NonNull org.gradle.api.provider.Property<InetSocketAddress> The InetSocketAddress to which the server will be bound.abstract @NonNull org.gradle.api.file.DirectoryPropertyDirectory where the Hytale server files are located.abstract @NonNull org.gradle.api.provider.Property<URI> URI used to download the server software.abstract @NonNull org.gradle.api.provider.Property<File> The primary executable JAR file for the server.abstract @NonNull org.gradle.api.provider.Property<String> The entry point class name for the Hytale server.abstract @NonNull org.gradle.api.provider.Property<OnlineMode> Property which allows to change the server online mode.voidmods(@NonNull org.gradle.api.Action<? super ModExtension> action) Configures the server mods via an action.voidserverAddress(@NonNull String host, int port) Sets the network address and port for the Hytale server.
-
Constructor Details
-
HytalePluginExtension
@Inject public HytalePluginExtension(@NonNull 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
-
dependsOnBuildTask
-
dependsOnBuildTask
-
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
-
getEnvironment
-
getServerDirectory
public abstract @NonNull org.gradle.api.file.DirectoryProperty getServerDirectory()Directory where the Hytale server files are located.- Returns:
- the property containing the server directory
-
getRunDirectory
public abstract @NonNull org.gradle.api.file.DirectoryProperty getRunDirectory()Root directory for server execution.- Returns:
- the property containing the run directory
-
getModDirectory
public abstract @NonNull org.gradle.api.file.DirectoryProperty getModDirectory()Directory where server mods will be installed.- Returns:
- the property containing the mods directory
-
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
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
-
getJvmArgs
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
-
getDependsOnBuildTask
-