Merge pull request #298

Add an option to disable display module completely
This commit is contained in:
Will FP 2022-10-05 08:39:09 +01:00 committed by GitHub
commit 2b1c77483f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -80,7 +80,10 @@ class EcoEnchantsPlugin : LibReforgePlugin() {
)
}
override fun createDisplayModule(): DisplayModule {
override fun createDisplayModule(): DisplayModule? {
if (configYml.getBoolOrNull("display.enabled") == false) {
return null
}
return EnchantDisplay(this)
}

View File

@ -31,6 +31,8 @@ anvil:
# Options for how enchantments are displayed on items
display:
enabled: true # Setting this to false will disable all visual item modifications
numerals:
enabled: true # If numerals should be used for the enchantment levels
threshold: 10 # Above this, numbers will be used instead of numerals