Add an option to disable display module completely

This commit is contained in:
MelonCode 2022-09-15 03:04:24 +03:00
parent f533654670
commit 753956d049
2 changed files with 6 additions and 1 deletions

View File

@ -86,7 +86,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