Class ModExtension

java.lang.Object
wtf.ranked.hytale.server.runner.mod.ModExtension

public abstract class ModExtension extends Object
Configuration extension for managing Hytale mods.

Provides a DSL for users to define mod dependencies from various sources like direct URLs or GitHub releases. These definitions are collected into a list and processed by the DownloadModStep.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract @NonNull org.gradle.api.provider.ListProperty<Mod>
    Retrieves the list of all configured mods.
    final void
    github(@NonNull String owner, @NonNull String repository, @NonNull String tag, @NonNull String assetName)
    Adds a mod to the configuration from a GitHub Release asset.
    final void
    url(@NonNull String url, @NonNull String file)
    Adds a mod to the configuration via a direct download link.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModExtension

      public ModExtension()
  • Method Details

    • getMods

      @Input public abstract @NonNull org.gradle.api.provider.ListProperty<Mod> getMods()
      Retrieves the list of all configured mods.
      Returns:
      a property containing the collection of Mod instances
    • url

      public final void url(@NonNull String url, @NonNull String file)
      Adds a mod to the configuration via a direct download link.
      Parameters:
      url - the direct download URL for the mod file
      file - the name the file should be saved as locally
    • github

      public final void github(@NonNull String owner, @NonNull String repository, @NonNull String tag, @NonNull String assetName)
      Adds a mod to the configuration from a GitHub Release asset.
      Parameters:
      owner - the GitHub user or organization
      repository - the name of the repository
      tag - the specific release tag (e.g., "v1.0.0")
      assetName - the name of the file attached to the release