diff options
| author | AfkF24 <us.faris.ajanovic@gmail.com> | 2024-01-25 03:28:55 +0100 |
|---|---|---|
| committer | Leonardo Bishop <13875753+LMBishop@users.noreply.github.com> | 2024-02-11 16:42:43 +0000 |
| commit | e356e1c7aefedb201f2348d4d7cf0a874fe0932c (patch) | |
| tree | 6d6959ac996643f842335b8fa6eeb7a2da10a57f | |
| parent | af1a539c75a0fa70b7d7fd554e5a5f6c9db6d447 (diff) | |
Support custom elements in started quests menu
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 |
