1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00
Clone
13
Configuration
Lionarius edited this page 2026-01-14 19:07:11 +03:00

The configuration file is located at ./config/skinrestorer/config.json and is automatically created after the first launch.

A complete configuration example is provided below.

language

  • Description: Sets the language used on the server and displayed for players who do not have the mod installed.
  • Default: "en_us"
  • Possible values: Refer to the supported languages.

refreshSkinOnJoin

  • Description: Determines if the player's skin should be refetched every time they join the server.
  • Default: true
  • Possible values: true (enabled), false (disabled).

skinApplyDelayOnJoin

  • Description: Sets a delay (in server ticks) before applying a saved skin after a player joins. This may help with compatibility with other mods by waiting until the player is fully loaded.
  • Default: 0
  • Possible values: Any non-negative number.

fetchSkinOnFirstJoin

  • Description: Determines if the server fetches a skin for a player the first time they join (or after a skin reset) based on their username. Only works if no skin is saved yet.
  • Default: true
  • Possible values: true (enabled), false (disabled).
  • Note: This option is relevant only for offline or insecure servers.

forceFirstJoinSkinFetch

  • Description: Forces the server to fetch a skin from firstJoinSkinProvider even when the server is in online mode (when the player already has an official skin). Only applies when firstJoinSkinProvider is not set to MOJANG.
  • Default: false
  • Possible values: true (enabled), false (disabled).

firstJoinSkinProvider

  • Description: Specifies which skin provider to use when fetchSkinOnFirstJoin is set to true.
  • Default: MOJANG
  • Possible values:
    • MOJANG (or mojang)
    • ELY.BY (or ely.by, ELY_BY, ely_by)
    • COLLECTION (or collection)
  • Note: This option is case-sensitive.

proxy

  • Description: Specifies a proxy server address for making HTTP requests.
  • Possible values: Any string formatted as hostname:port.
  • Default: ""

requestTimeout

  • Description: Sets the maximum duration (in seconds) that a request for a skin can take before timing out.
  • Default: 10
  • Possible values: Any positive integer.

providers

Provider Fields:

  • enabled
    • Description: Determines whether the skin provider is active. If a provider is disabled (false), it will not appear as an option in the /skin set command.
    • Possible Values: true (enabled), false (disabled).
    • Note: Requires a server restart to apply changes.
  • name
    • Description: Specifies how the provider is displayed in the /skin set command.
    • Possible Values: Any non-empty string, except "empty", "mojang", "ely.by", "web", "collection".
    • Note: Requires a server restart to apply changes.
  • cache
    • Description: Specifies the cache settings for the skin provider.
    • Fields
      • enabled
        • Description: Enables or disables caching for skins fetched from this provider.
        • Possible Values: true (enabled), false (disabled).
      • duration
        • Description: Specifies how long the skin should be cached (in seconds).
        • Possible Values: Any positive integer.

providers.mojang

  • Description: Configuration for the Mojang skin provider. Fetches skins from Mojang's official API by resolving a username to UUID and retrieving the player's profile.
  • Default:
    • enabled: true
    • name: "mojang"
    • cache.enabled: true
    • cache.duration: 60

providers.ely_by

  • Description: Configuration for the Ely.by skin provider. Fetches skins from the Ely.by skin system API by username.
  • Default:
    • enabled: true
    • name: "ely.by"
    • cache.enabled: true
    • cache.duration: 60

providers.mineskin

  • Description: Configuration for the Mineskin skin provider. Converts skin image URLs into game skin data using the Mineskin API. Supports both URLs and variant selection (classic/slim).
  • Additional fields
    • apiKey
      • Description: Specifies the API key for requests to the Mineskin API.
      • Possible Values: Any string.
  • Default:
    • enabled: true
    • name: "web"
    • cache.enabled: true
    • cache.duration: 300
    • apiKey: ""

providers.collection

  • Description: Configuration for the Collection skin provider. Allows serving skins from local files or URLs. Uses the Mineskin API under the hood to convert skin files/URLs into game skin data.
  • Additional fields
    • sources
      • Description: List of skin sources to use as the collection pool. Skins are randomly selected from this list.
      • Possible Values:
        • File source (local file):
          • path: Path to the skin image file relative to the config directory.
          • variant: Skin variant type. classic (standard) or slim (slim arms).
        • URL source (remote):
          • url: URL to the skin image.
          • variant: Skin variant type. classic (standard) or slim (slim arms).
  • Default:
    • enabled: false
    • name: "collection"
    • cache.enabled: true
    • cache.duration: 604800
    • sources: []

Full Configuration Example

{
  "language": "en_us",
  "refreshSkinOnJoin": true,
  "skinApplyDelayOnJoin": 0,
  "fetchSkinOnFirstJoin": true,
  "forceFirstJoinSkinFetch": false,
  "firstJoinSkinProvider": "MOJANG",
  "proxy": "proxy.example.com:8080",
  "requestTimeout": 10,
  "providers": {
    "mojang": {
      "enabled": true,
      "name": "mojang",
      "cache": {"enabled": true, "duration": 60}
    },
    "ely_by": {
      "enabled": true,
      "name": "ely.by",
      "cache": {"enabled": true, "duration": 60}
    },
    "mineskin": {
      "enabled": true,
      "name": "web",
      "apiKey": "your_mineskin_api_key_here",
      "cache": {"enabled": true, "duration": 300}
    },
    "collection": {
      "enabled": false,
      "name": "collection",
      "sources": [
        {"path": "skins/steve.png", "variant": "classic"},
        {"path": "skins/alex.png", "variant": "slim"},
        {"url": "https://example.com/custom_skin.png", "variant": "classic"}
      ],
      "cache": {"enabled": true, "duration": 604800}
    }
  }
}