Skip to content

Configuration

The main plugin configuration is stored in the data folder as config.json.

Overview

Here's the default configuration as of v2.2:

{
  "config-version": 22,
  "configuration": {
    "settings": {
      "generate-readme": true,
      "locale": "en_US",
      "players-can-change-locales": true,
      "include-default-locales": true,
      "storage-medium": "json",
      "storage-saving-period-ticks": 900,
      "notify-players-of-data-loading": true,
      "repository-url": "https://ue.runderscore.com/api/v1/"
    },
    "misc": {
      "bStats": true,
      "update-checker-frequency-hours": 24,
      "notify-ops-about-updates": true,
      "debug": true
    },
    "generation": {
      "chest-loot-chance": 14.2857142857149,
      "fishing-loot-chance": 14.2857142857149,
      "villager-item-trade-chance": 14.2857142857149,
      "enchantment-chance": 14.2857142857149
    },
    "ui": {
      "truncate-pack-data-after-x-enchantments": 10
    },
    "enchantments": {
      "limit": -1
    }
  }
}

Fields specification

Below is the specification for each field of the configuration, except for config-version.

Do not change config-version!

This field is used internally when updating between versions. It is not to be changed by the user.

settings

This node of the configuration is responsible for general settings that affect the workflow of the plugin.

generate-readme

Description: Whether to generate a README.md file in the data folder if it is missing.

Possible values: true, false

Default value: true

locale

Description: The plugin-wide locale, used in the console output and is also the default locale for all players.

Possible values: any locale identifier that is currently present in the messages folder; by default, en_US and ru_RU are present

Default value: en_US

players-can-change-locales

Description: Whether players can change their locales using /ue locale. If this is disabled, administrators also cannot use /ue locale to change the locale of players.

Possible values: true, false

Default value: true

include-default-locales

Description: Whether to include the locales that are bundled by default if they are not present in the messages folder. Those locales are en_US and ru_RU.

Possible values: true, false

Default value: true

storage-medium

Description: This field specifies the storage type that should be used for storing player data.

Possible values: yaml, json, mongodb, mysql (case-insensitive)

Default value: json

storage-saving-period-ticks

Description: This is the frequency of uploading changes to the storage, specified in Minecraft ticks (1 tick = 0.05s).

Possible values: any natural number (integer above 0)

Default value: 900

notify-players-of-data-loading

Description: Whether to notify players about their data being loaded in the chat.

Possible values: true, false

Default value: true

repository-url

Description: This URL specifies the repository that should be used with the browsing GUIs and commands like the /ue download command. By default this is set to the central UnderscoreEnchants repository, however, since it is self-hostable, administrators are free to specify whatever repository they wish to use. This will not affect the already downloaded contents.

Possible values: any repository URL, ending with a backslash (/)

Default value: https://ue.runderscore.com/api/v1/

misc

This node of the configuration holds the settings that do not directly affect the workflow of the plugin.

bStats

Description: Whether to turn on bStats analytics. bStats does not collect any sensitive information. You can click on the link to see what exactly is collected and opt out if you wish. bStats has almost no effect on the performance.

Possible values: true, false

Default value: true

update-checker-frequency-hours

Description: This field represents the frequency of the update checker in hours. If it finds a new update, it sends a message to the console. Optionally, it sends notifications to the OPs when they join the server.

Possible values: any integer (set to 0 or below to disable)

Default value: 24

notify-ops-about-updates

Description: Whether to notify OPs when they join the server that the server is not running the latest version of UnderscoreEnchants.

Possible values: true, false

Default value: true

debug

Description: Whether to log extra debug messages to the console.

Possible values: true, false

Default value: true

generation

In this node of the configuration you can tweak the settings of loot generation. In the context of UnderscoreEnchants, all loot generation is intercepted in order to turn vanilla-enchanted items into UnderscoreEnchants-enchanted items. Additionally, using the settings below, it can randomly enchant items with custom enchantments as well.

chest-loot-chance

Description: The percentage of enchanting a random unenchanted item with a custom enchantment when generating chest loot.

Possible values: any fractional number between 0.0 and 100.0

Default value: 14.2857142857149 (1/7)

fishing-loot-chance

Description: The percentage of enchanting a random unenchanted item with a custom enchantment when generating fishing loot.

Possible values: any fractional number between 0.0 and 100.0

Default value: 14.2857142857149 (1/7)

villager-item-trade-chance

Description: The percentage of enchanting a random unenchanted item with a custom enchantment when generating villager trades.

Possible values: any fractional number between 0.0 and 100.0

Default value: 14.2857142857149 (1/7)

enchantment-chance

Description: The percentage of adding a custom enchantment to an item when using the enchanting table.

Possible values: any fractional number between 0.0 and 100.0

Default value: 14.2857142857149 (1/7)

ui

This node of the configuration holds various settings for the plugin GUIs, e.g. browsing GUIs.

truncate-pack-data-after-x-enchantments

Description: This field indicates the maximum amount of enchantments shown in the pack preview GUI. Any enchantments after that are truncated (e.g. "Enchantment 1", "Enchantment 2" and 9 more enchantments)

Possible values: any non-zero integer

Default value: 10

enchantments

This node of the configuration is responsible for miscellaneous settings related to enchantments as a whole.

limit

Description: This field indicates the maximum amount of enchantments on an item.

Possible values: any integer (when set to -1 or lower, no limit is set)

Default value: -1