diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/pets/PetLevelGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/pets/PetLevelGUI.kt index 8ce413f..8f7c4ca 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/pets/PetLevelGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/pets/PetLevelGUI.kt @@ -67,7 +67,13 @@ class PetLevelGUI( } menu = menu(plugin.configYml.getInt("level-gui.rows")) { - title = pet.name + title = plugin.langYml.getString("menu.level-title").takeIf { it.isNotEmpty() } ?: run { + plugin.langYml.set("menu.level-title", "%pet%") + plugin.langYml.save() + plugin.langYml.getString("menu.level-title") + } + + title = title.replace("%pet%", pet.name) maxPages(component.pages) diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index fa9b328..c58d048 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -27,5 +27,6 @@ messages: menu: title: "Pets" + level-title: "%pet%" infinity: "∞"