Class ModInfo

java.lang.Object
com.velocitypowered.api.util.ModInfo

public final class ModInfo extends Object
Represents the information for a Forge mod list.
  • Field Details

    • DEFAULT

      public static final ModInfo DEFAULT
      The default mod info used when no mods are present. Typically used for Forge-compatible connections that require a placeholder.
  • Constructor Details

    • ModInfo

      public ModInfo(String type, List<ModInfo.Mod> modList)
      Constructs a new ModInfo instance.
      Parameters:
      type - the Forge server list version to use
      modList - the mods to present to the client
  • Method Details

    • getType

      public String getType()
      Returns the Forge mod list type (e.g., "FML").
      Returns:
      the mod list type
    • getMods

      public List<ModInfo.Mod> getMods()
      Returns an immutable list of all mods in this mod list.
      Returns:
      the list of mods
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object