From e356e1c7aefedb201f2348d4d7cf0a874fe0932c Mon Sep 17 00:00:00 2001 From: AfkF24 Date: Thu, 25 Jan 2024 03:28:55 +0100 Subject: Support custom elements in started quests menu --- .../com/leonardobishop/quests/bukkit/menu/StartedQMenu.java | 2 +- bukkit/src/main/resources/resources/bukkit/config.yml | 8 ++++++++ docs/configuration/custom-gui-items.md | 13 +++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/menu/StartedQMenu.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/menu/StartedQMenu.java index 0f64a5d3..f0afeeea 100644 --- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/menu/StartedQMenu.java +++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/menu/StartedQMenu.java @@ -28,7 +28,7 @@ public class StartedQMenu extends PaginatedQMenu { elements.add(new QuestMenuElement(plugin, quest, this)); } - super.populate(null, elements, null); + super.populate("custom-elements.started", elements, null); } } diff --git a/bukkit/src/main/resources/resources/bukkit/config.yml b/bukkit/src/main/resources/resources/bukkit/config.yml index 8a9d3e45..32733079 100644 --- a/bukkit/src/main/resources/resources/bukkit/config.yml +++ b/bukkit/src/main/resources/resources/bukkit/config.yml @@ -368,6 +368,14 @@ gui: # - "&7This is a custom item which can be added" # - "&7to your menus. This is purely cosmetic." # type: "EMERALD_BLOCK" +# "started": # apply to the started quests menu +# 0: +# display: +# name: "&cExample Custom Item (slot 1)" +# lore: +# - "&7This is a custom item which can be added" +# - "&7to your menus. This is purely cosmetic." +# type: "EMERALD_BLOCK" # ----------------------------------------------------------- diff --git a/docs/configuration/custom-gui-items.md b/docs/configuration/custom-gui-items.md index f7a2bbac..9473f4f8 100644 --- a/docs/configuration/custom-gui-items.md +++ b/docs/configuration/custom-gui-items.md @@ -5,8 +5,8 @@ nav_order: 7 --- # Custom GUI items -**Custom GUI items** are dummy items added to the category menu and the -quest menu. This can be used to help stylise your quests GUI. +**Custom GUI items** are dummy items added to category, quest and +started menus. This can be used to help stylise your quests GUI. This can be done in the `config.yml`: @@ -66,3 +66,12 @@ custom-elements: "quests": # apply to whole quests menu if categories are disabled # ... ``` + +Additionally, you can add custom items to the started quests menu by +specifying it with "started": + +``` yaml +custom-elements: + "started": # apply to the started quests menu + # ... +``` \ No newline at end of file -- cgit v1.2.3-70-g09d2