Skip to content

Conversation

@CodyAdam
Copy link
Contributor

Issue

The gradlew runServer doesn't pass in the Assets.zip file as a parameter, which causes the server to crash.

Solution

I added a property in the build.gradle.kts to allow the user to pass in the Assets.zip location so it's used.

Bonus

I also made the two fields be able to accept either URLs, relative, or absolute paths.

@Joshi234
Copy link

Joshi234 commented Jan 13, 2026

I can confirm this works, probably the easiest wat to fix this as you need authentication for the download, authentication could be something for down the road.
To actually make this work the plugin dir needs to be changed to "mods" instead of "plugins"

Edit:
Also the dependency needs to be updated to the serverjar aswell so you have the actual api

@Joshi234
Copy link

Its working:
image

@CodyAdam
Copy link
Contributor Author

@Joshi234 I didn't really understand what you meant, could you rephrase ?

@DanielNovaesDias
Copy link

DanielNovaesDias commented Jan 13, 2026

I believe the only observation he had is that the "plugins" folder where the user's plugin is being copied to should be named mods instead for it to work with the hytale jar. It doesn't have anything to do with the PR tho.

@Joshi234
Copy link

Joshi234 commented Jan 14, 2026

I believe the only observation he had is that the "plugins" folder where the user's plugin is being copied to should be named mods instead for it to work with the hytale jar. It doesn't have anything to do with the PR tho.

Yeah that and the server jar needs to be set as dependency in the gradle so you can actually write plugins

dependencies {
    // Hytale Server API (provided by server at runtime)
    compileOnly(files("./HytaleServer.jar"))

    // Common dependencies (will be bundled in JAR)
    implementation("com.google.code.gson:gson:2.10.1")
    implementation("org.jetbrains:annotations:24.1.0")

    // Test dependencies
    testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

in build.gradle.kts
andin RunHytalePlugin.kt

fun run() {
        // Create directories
        val runDir = File(project.projectDir, "run").apply { mkdirs() }
        val pluginsDir = File(runDir, "mods").apply { mkdirs() }
        val jarFile = File(runDir, "server.jar")

While thoes fixed doen't relate directly to your pr, it would be nice if you could commit them to make this template usable with this pr

Adjusted the paths in build.gradle.kts to reference the correct locations for HytaleServer.jar and Assets.zip. Updated README to reflect changes in the server's mods folder instead of plugins folder for clarity.
@CodyAdam
Copy link
Contributor Author

I updated the PR with the renaming to mods folder

// Hytale API (provided by server)
compileOnly(files("libs/hytale-server.jar"))
compileOnly(files("./HytaleServer.jar"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected to have ./HytaleServer.jar here while in other places it is at ./libs/HytaleServer.jar ?

Copy link

@jeanniardJ jeanniardJ Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that in the build.gradle.kts file, there is the following path: "./libs/HytaleServer.jar".

@realBritakee realBritakee merged commit 1cf2fe3 into realBritakee:main Jan 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants