java.lang.Object
wtf.ranked.hytale.server.runner.mod.Mod
wtf.ranked.hytale.server.runner.mod.type.UrlMod
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GithubMod

public class UrlMod extends Mod
A mod implementation defined by a direct web URL.

This type is used for mods hosted on static file servers or CDNs where a direct link to the .jar file is available.

See Also:
  • Field Summary

    Fields inherited from class wtf.ranked.hytale.server.runner.mod.Mod

    fileName
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    UrlMod(@NonNull String fileName, @NonNull URI uri)
    Internal constructor for creating a URL-based mod.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NonNull UrlMod
    of(@NonNull String url, @NonNull String fileName)
    Static factory to create a mod from a URL string.
    static @NonNull UrlMod
    of(@NonNull URI uri, @NonNull String fileName)
    Static factory to create a mod from a URI.

    Methods inherited from class wtf.ranked.hytale.server.runner.mod.Mod

    normalizeFileName

    Methods inherited from class java.lang.Object

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

    • UrlMod

      protected UrlMod(@NonNull String fileName, @NonNull URI uri)
      Internal constructor for creating a URL-based mod.
      Parameters:
      fileName - normalized name of the file to save
      uri - source location
  • Method Details

    • of

      public static @NonNull UrlMod of(@NonNull String url, @NonNull String fileName)
      Static factory to create a mod from a URL string.
      Parameters:
      url - the raw string URL
      fileName - the desired local file name
      Returns:
      a new UrlMod instance
    • of

      public static @NonNull UrlMod of(@NonNull URI uri, @NonNull String fileName)
      Static factory to create a mod from a URI.
      Parameters:
      uri - the source URI
      fileName - the desired local file name
      Returns:
      a new UrlMod instance