Config

data class Config(var LANG: FieldLanguageMode = FieldLanguageMode.DEFAULT, var MAX_TRADES: Int = 0, var VILLAGER_BLACKLIST: ArrayList<String> = ArrayList(), var DISABLE_PRICE_PENALTY: Boolean = true, var UNINSTALL_MODE: Boolean = false, var ALLOW_TRAVELLING_MERCHANTS: Boolean = true, var CHECK_UPDATE: Boolean = true, var ALLOW_METRICS: Boolean = true) : FileBind

Represents the configuration for the plugin.

Constructors

Link copied to clipboard
constructor(LANG: FieldLanguageMode = FieldLanguageMode.DEFAULT, MAX_TRADES: Int = 0, VILLAGER_BLACKLIST: ArrayList<String> = ArrayList(), DISABLE_PRICE_PENALTY: Boolean = true, UNINSTALL_MODE: Boolean = false, ALLOW_TRAVELLING_MERCHANTS: Boolean = true, CHECK_UPDATE: Boolean = true, ALLOW_METRICS: Boolean = true)

Properties

Link copied to clipboard
@ConfigField(name = "Allow metrics", description = "Indicates if metrics are allowed", defaultValue = "true")
@SerializedName(value = "allowMetrics")
var ALLOW_METRICS: Boolean

Indicates if metrics are allowed.

Link copied to clipboard
@ConfigField(name = "Allow travelling merchants", description = "Indicates if travelling merchants are allowed", defaultValue = "true")
@SerializedName(value = "allowTravellingMerchants")
var ALLOW_TRAVELLING_MERCHANTS: Boolean

Indicates if travelling merchants are allowed.

Link copied to clipboard
@ConfigField(name = "Check for updates", description = "Indicates if the plugin should check for updates", defaultValue = "true")
@SerializedName(value = "checkUpdate")
var CHECK_UPDATE: Boolean

Indicates if checking for updates is allowed.

Link copied to clipboard
@ConfigField(name = "Disable price penalty", description = "Indicates if the price penalty should be disabled", defaultValue = "true")
@SerializedName(value = "disablePricePenalty")
var DISABLE_PRICE_PENALTY: Boolean

Indicates if the price penalty is disabled.

Link copied to clipboard
@ConfigField(name = "Language", description = "The language mode of the plugin", defaultValue = "default")
@SerializedName(value = "lang")
var LANG: FieldLanguageMode
Link copied to clipboard
@ConfigField(name = "Max trades per villager", description = "The maximum amount of trades a villager can have per restock", defaultValue = "0")
@SerializedName(value = "maxTrades")
var MAX_TRADES: Int

The maximum number of trades allowed.

Link copied to clipboard
@ConfigField(name = "Uninstall mode", description = "Indicates if the plugin should be in uninstall mode", defaultValue = "false")
@SerializedName(value = "uninstallMode")
var UNINSTALL_MODE: Boolean

Indicates if the uninstall mode is enabled.

Link copied to clipboard
@ConfigField(name = "Villager blacklist", description = "The list of professions that should not be restocked", defaultValue = "[]")
@SerializedName(value = "villagerBlacklist")
var VILLAGER_BLACKLIST: ArrayList<String>

The list of blacklisted villagers.

Functions

Link copied to clipboard
fun fromText(text: String): Boolean
Link copied to clipboard
fun read()
Link copied to clipboard
fun save()