From c83bf6e6071c52165e1de8b2cee7d4e5ce8de858 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 30 Oct 2023 12:50:10 +0000 Subject: [PATCH] The Job level GUI title is now customisable --- .../src/main/kotlin/com/willfp/ecojobs/jobs/JobLevelGUI.kt | 5 ++++- eco-core/core-plugin/src/main/resources/config.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/jobs/JobLevelGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/jobs/JobLevelGUI.kt index 63f7d19..3ae51f1 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/jobs/JobLevelGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/jobs/JobLevelGUI.kt @@ -13,6 +13,7 @@ import com.willfp.eco.core.gui.slot.MaskItems import com.willfp.eco.core.items.Items import com.willfp.eco.core.items.builder.ItemStackBuilder import com.willfp.eco.util.NumberUtils +import com.willfp.eco.util.formatEco import com.willfp.ecojobs.api.getJobLevel import com.willfp.ecomponent.components.LevelComponent import com.willfp.ecomponent.components.LevelState @@ -65,7 +66,9 @@ class JobLevelGUI( } menu = menu(plugin.configYml.getInt("level-gui.rows")) { - title = job.name + title = plugin.configYml.getString("level-gui.title") + .replace("%job%", job.name) + .formatEco() maxPages(component.pages) diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index cf951c0..8b11df8 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -124,6 +124,7 @@ gui: level-gui: rows: 6 + title: "%job%" mask: # The way the mask works is by having a list of materials