mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Automaticly add default value when value is absent
This commit is contained in:
parent
3bdb0ce536
commit
cfe0faf456
3 changed files with 67 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import xyz.alexcrea.cuanvil.enchant.CAEnchantmentRegistry
|
|||
import xyz.alexcrea.cuanvil.gui.config.MainConfigGui
|
||||
import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant
|
||||
import xyz.alexcrea.cuanvil.listener.ChatEventListener
|
||||
import xyz.alexcrea.cuanvil.update.PluginSetDefault
|
||||
import xyz.alexcrea.cuanvil.update.Update_1_21
|
||||
import xyz.alexcrea.cuanvil.util.Metrics
|
||||
import java.io.File
|
||||
|
|
@ -146,6 +147,9 @@ class CustomAnvil : JavaPlugin() {
|
|||
MainConfigGui.getInstance().init(DependencyManager.packetManager)
|
||||
GuiSharedConstant.loadConstants()
|
||||
|
||||
// Finally, re add default we may be missing
|
||||
PluginSetDefault.reAddMissingDefault()
|
||||
|
||||
}
|
||||
|
||||
fun reloadResource(
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ object ConfigOptions {
|
|||
|
||||
const val WORK_PENALTY_TYPE = "work_penalty_type"
|
||||
|
||||
private const val DEFAULT_LIMIT_PATH = "default_limit"
|
||||
const val DEFAULT_LIMIT_PATH = "default_limit"
|
||||
|
||||
const val ENCHANT_LIMIT_ROOT = "enchant_limits"
|
||||
const val ENCHANT_VALUES_ROOT = "enchant_values"
|
||||
|
|
@ -72,7 +72,7 @@ object ConfigOptions {
|
|||
const val DEFAULT_PERMISSION_NEEDED_FOR_COLOR = true
|
||||
const val DEFAULT_USE_OF_COLOR_COST = 0
|
||||
|
||||
private const val DEFAULT_ENCHANT_LIMIT = 5
|
||||
const val DEFAULT_ENCHANT_LIMIT = 5
|
||||
|
||||
// Debug flag
|
||||
private const val DEFAULT_DEBUG_LOG = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue