diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt index 8f821cd1..a7d3974d 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt @@ -21,6 +21,7 @@ import com.willfp.eco.core.items.builder.ItemStackBuilder import com.willfp.eco.core.items.isEmpty import com.willfp.eco.util.StringUtils import com.willfp.eco.util.formatEco +import com.willfp.eco.util.toNiceString import com.willfp.ecoenchants.EcoEnchantsPlugin import com.willfp.ecoenchants.display.EnchantSorter.sortForDisplay import com.willfp.ecoenchants.display.getFormattedName @@ -261,6 +262,12 @@ private fun EcoEnchant.getInformationSlot(plugin: EcoEnchantsPlugin): Slot { }.ifEmpty { plugin.langYml.getFormattedString("no-conflicts").toWrappable() } } ) + .replace("%tradeable%", plugin.langYml + .getFormattedString(this.isTradeable.yesOrNo)) + .replace("%discoverable%", plugin.langYml + .getFormattedString(this.isDiscoverable.yesOrNo)) + .replace("%enchantable%", plugin.langYml + .getFormattedString(this.isEnchantable.yesOrNo)) } .flatMap { WordUtils.wrap(it, 45, "\n", false) @@ -279,3 +286,8 @@ private fun EcoEnchant.getInformationSlot(plugin: EcoEnchantsPlugin): Slot { ) } } + +val Boolean.yesOrNo: String + get() { + return if (this) "yes" else "no" +} diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index ae385b42..f3cb70ad 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -17,5 +17,7 @@ messages: all: "All" +yes: "&aYes" +no: "&cNo" no-conflicts: "No Conflicts" all-conflicts: "All Other Enchantments" \ No newline at end of file