diff --git a/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java b/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java index d32b101..491455f 100644 --- a/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java @@ -7,6 +7,8 @@ import com.songoda.epicenchants.utils.objects.ItemBuilder; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.event.Listener; +import java.util.Optional; + import static com.songoda.epicenchants.utils.single.GeneralUtils.*; public class MainInfoMenu extends FastInv implements Listener { @@ -18,6 +20,7 @@ public class MainInfoMenu extends FastInv implements Listener { .map(s -> "contents." + s) .map(config::getConfigurationSection) .forEach(section -> addItem(getSlots(section.getString("slot")), new ItemBuilder(section).build(), event -> { + if (section.getString("group") == null) return; Group group = instance.getGroupManager().getValue(section.getString("group")) .orElseThrow(() -> new IllegalArgumentException("Invalid group: " + section.getString("group"))); instance.getInfoManager().getMenu(group).ifPresent(menu -> menu.open(event.getPlayer())); diff --git a/src/main/resources/version-dependent/legacy/menus/alchemist-menu.yml b/src/main/resources/version-dependent/legacy/menus/alchemist-menu.yml index b2c6dd8..1e50b6b 100644 --- a/src/main/resources/version-dependent/legacy/menus/alchemist-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/alchemist-menu.yml @@ -34,6 +34,22 @@ contents: accept-before: material: INK_SACK data: 1 + display-name: "&cWaiting for you..." + lore: + - "&7The alchemist is waiting" + - "&7for your enchange..." + accept-after: + material: INK_SACK + data: 10 + display-name: "&eClick to confirm" + lore: + - "&cCost: {exp_cost} EXP" + - "" + - "&7Click to confirm the exchange" + - "&7after which you will receive" + - "&7the item displayed above." + explanation: + material: PAINTING display-name: "&8[&eThe Alchemist&8]" lore: - "&7The alchemist will exchange:" @@ -47,18 +63,6 @@ contents: - "&7(of the same rarity) &ffor" - "&fthe same dust" - "&7(of a higher percentage)" - accept-after: - material: INK_SACK - data: 1 - display-name: "&eClick to confirm" - lore: - - "&cCost: {exp_cost} EXP" - - "" - - "&7Click to confirm the exchange" - - "&7after which you will receive" - - "&7the item displayed above." - explanation: - material: PAINTING slot: 4 corners: material: STAINED_GLASS_PANE @@ -69,4 +73,4 @@ contents: material: STAINED_GLASS_PANE data: 3 display-name: "&r" - slot: "2,3,5,6,18,26,38,39,40,41,42" + slot: "2,3,5,6,18,26,38,39,40,41,42" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml b/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml index b20ddfa..52cc5c3 100644 --- a/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml @@ -1,10 +1,10 @@ title: "Enchanter" rows: 3 -#You can choose to fill the entire inventory with this material -#fill: -# material: "MATERIAL_HERE" -# display-name: "&r" + #You can choose to fill the entire inventory with this material + #fill: + # material: "MATERIAL_HERE" + # display-name: "&r" contents: 1: @@ -89,6 +89,12 @@ contents: slot: 15 explanation: material: PAINTING + display-name: "&6&lEnchanter" + lore: + - "&7Click to &6buy &7a tiered enchantment book." + - "" + - "&6Right Click &7the book for a &6random &7enchant" + - "&7of that tier." slot: 4 corners: material: STAINED_GLASS_PANE diff --git a/src/main/resources/version-dependent/legacy/menus/groups/elite-menu.yml b/src/main/resources/version-dependent/legacy/menus/groups/elite-menu.yml index 06c65d5..eb977d7 100644 --- a/src/main/resources/version-dependent/legacy/menus/groups/elite-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/groups/elite-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&b&lElite Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/groups/legendary-menu.yml b/src/main/resources/version-dependent/legacy/menus/groups/legendary-menu.yml index 989fcc9..4ad0e27 100644 --- a/src/main/resources/version-dependent/legacy/menus/groups/legendary-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/groups/legendary-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&6&lLegendary Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/groups/simple-menu.yml b/src/main/resources/version-dependent/legacy/menus/groups/simple-menu.yml index f43e8dd..0c1b552 100644 --- a/src/main/resources/version-dependent/legacy/menus/groups/simple-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/groups/simple-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&f&lSimple Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/groups/ultimate-menu.yml b/src/main/resources/version-dependent/legacy/menus/groups/ultimate-menu.yml index fec2393..245767e 100644 --- a/src/main/resources/version-dependent/legacy/menus/groups/ultimate-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/groups/ultimate-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&e&lUltimate Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/groups/unique-menu.yml b/src/main/resources/version-dependent/legacy/menus/groups/unique-menu.yml index ffe96ef..829135f 100644 --- a/src/main/resources/version-dependent/legacy/menus/groups/unique-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/groups/unique-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&a&lUnique Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/legacy/menus/tinkerer-menu.yml b/src/main/resources/version-dependent/legacy/menus/tinkerer-menu.yml index a9f58c8..1218bf7 100644 --- a/src/main/resources/version-dependent/legacy/menus/tinkerer-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/tinkerer-menu.yml @@ -29,6 +29,13 @@ contents: slot: 49 explanation: material: PAINTING + display-name: "&6&lTinkerer" + lore: + - "&6Click &7to insert the books you would" + - "&7like to &6deposit&7." + - "" + - "&7The &6left &7is the items you are &6depositing&7." + - "&7The &6right &7is the items you are &6receiving&7." slot: 4 corners: material: STAINED_GLASS_PANE diff --git a/src/main/resources/version-dependent/master/menus/alchemist-menu.yml b/src/main/resources/version-dependent/master/menus/alchemist-menu.yml index 224a061..634f62f 100644 --- a/src/main/resources/version-dependent/master/menus/alchemist-menu.yml +++ b/src/main/resources/version-dependent/master/menus/alchemist-menu.yml @@ -30,7 +30,22 @@ contents: - "&7will receive from the alchemist" - "&7will be displayed here." accept-before: - material: MAGENTA_DYE + material: RED_DYE + display-name: "&cWaiting for you..." + lore: + - "&7The alchemist is waiting" + - "&7for your enchange..." + accept-after: + material: LIME_DYE + display-name: "&eClick to confirm" + lore: + - "&cCost: {exp_cost} EXP" + - "" + - "&7Click to confirm the exchange" + - "&7after which you will receive" + - "&7the item displayed above." + explanation: + material: PAINTING display-name: "&8[&eThe Alchemist&8]" lore: - "&7The alchemist will exchange:" @@ -44,17 +59,6 @@ contents: - "&7(of the same rarity) &ffor" - "&fthe same dust" - "&7(of a higher percentage)" - accept-after: - material: MAGENTA_DYE - display-name: "&eClick to confirm" - lore: - - "&cCost: {exp_cost} EXP" - - "" - - "&7Click to confirm the exchange" - - "&7after which you will receive" - - "&7the item displayed above." - explanation: - material: PAINTING slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -63,4 +67,4 @@ contents: edge: material: LIGHT_BLUE_STAINED_GLASS_PANE display-name: "&r" - slot: "2,3,5,6,18,26,38,39,40,41,42" + slot: "2,3,5,6,18,26,38,39,40,41,42" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/enchanter-menu.yml b/src/main/resources/version-dependent/master/menus/enchanter-menu.yml index c1873e8..a3ddaa8 100644 --- a/src/main/resources/version-dependent/master/menus/enchanter-menu.yml +++ b/src/main/resources/version-dependent/master/menus/enchanter-menu.yml @@ -1,10 +1,10 @@ title: "Enchanter" rows: 3 -#You can choose to fill the entire inventory with this material -#fill: -# material: "MATERIAL_HERE" -# display-name: "&r" + #You can choose to fill the entire inventory with this material + #fill: + # material: "MATERIAL_HERE" + # display-name: "&r" contents: 1: @@ -53,7 +53,7 @@ contents: eco-cost: 0 slot: 13 4: - material: "PURPLE_DYE" + material: "YELLOW_DYE" display-name: "&e&lUltimate Enchantment &7(Right Click)" lore: - "&7Examine to receive a random" @@ -84,6 +84,12 @@ contents: slot: 15 explanation: material: PAINTING + display-name: "&6&lEnchanter" + lore: + - "&7Click to &6buy &7a tiered enchantment book." + - "" + - "&6Right Click &7the book for a &6random &7enchant" + - "&7of that tier." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE diff --git a/src/main/resources/version-dependent/master/menus/groups/elite-menu.yml b/src/main/resources/version-dependent/master/menus/groups/elite-menu.yml index 7c6103f..23b9512 100644 --- a/src/main/resources/version-dependent/master/menus/groups/elite-menu.yml +++ b/src/main/resources/version-dependent/master/menus/groups/elite-menu.yml @@ -20,6 +20,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&b&lElite Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -34,12 +38,4 @@ contents: back: material: OAK_FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 37 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 43 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/groups/legendary-menu.yml b/src/main/resources/version-dependent/master/menus/groups/legendary-menu.yml index 5fe8ec7..21df36b 100644 --- a/src/main/resources/version-dependent/master/menus/groups/legendary-menu.yml +++ b/src/main/resources/version-dependent/master/menus/groups/legendary-menu.yml @@ -20,6 +20,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&6&lLegendary Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -34,12 +38,4 @@ contents: back: material: OAK_FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/groups/simple-menu.yml b/src/main/resources/version-dependent/master/menus/groups/simple-menu.yml index 93f1e01..f7b58fd 100644 --- a/src/main/resources/version-dependent/master/menus/groups/simple-menu.yml +++ b/src/main/resources/version-dependent/master/menus/groups/simple-menu.yml @@ -21,6 +21,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&f&lSimple Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -35,12 +39,4 @@ contents: back: material: OAK_FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/groups/ultimate-menu.yml b/src/main/resources/version-dependent/master/menus/groups/ultimate-menu.yml index 364f380..5654e9d 100644 --- a/src/main/resources/version-dependent/master/menus/groups/ultimate-menu.yml +++ b/src/main/resources/version-dependent/master/menus/groups/ultimate-menu.yml @@ -9,8 +9,7 @@ group: ULTIMATE enchant-item: description-color: "&f" - material: "PURPLE_DYE" - data: 11 + material: "YELLOW_DYE" display-name: "{group_color}{enchant}" lore: - "&7Max level: &f{max_level}" @@ -21,6 +20,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&e&lUltimate Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -35,12 +38,4 @@ contents: back: material: OAK_FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/groups/unique-menu.yml b/src/main/resources/version-dependent/master/menus/groups/unique-menu.yml index 053c6c9..10ab494 100644 --- a/src/main/resources/version-dependent/master/menus/groups/unique-menu.yml +++ b/src/main/resources/version-dependent/master/menus/groups/unique-menu.yml @@ -20,6 +20,10 @@ enchant-item: contents: explanation: material: PAINTING + display-name: "&a&lUnique Enchants" + lore: + - "&7Hover over each item to see" + - "&7information about each enchant." slot: 4 corners: material: BLUE_STAINED_GLASS_PANE @@ -34,12 +38,4 @@ contents: back: material: OAK_FENCE_GATE display-name: "&cBack to main" - slot: "0,8" - next-page: - material: MAP - display-name: "&cNext page" - slot: 43 - previous-page: - material: MAP - display-name: "&cPrevious page" - slot: 37 \ No newline at end of file + slot: "0,8" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/main-info-menu.yml b/src/main/resources/version-dependent/master/menus/main-info-menu.yml index 5f6bf92..4a93893 100644 --- a/src/main/resources/version-dependent/master/menus/main-info-menu.yml +++ b/src/main/resources/version-dependent/master/menus/main-info-menu.yml @@ -18,7 +18,7 @@ contents: group: ELITE slot: 13 4: - material: "PURPLE_DYE" + material: "YELLOW_DYE" display-name: "&e&lUltimate Enchantments" group: ULTIMATE slot: 14 @@ -38,4 +38,4 @@ contents: whites: material: WHITE_STAINED_GLASS_PANE display-name: "&r" - slot: "10,16" + slot: "10,16" \ No newline at end of file diff --git a/src/main/resources/version-dependent/master/menus/tinkerer-menu.yml b/src/main/resources/version-dependent/master/menus/tinkerer-menu.yml index 8ee4b2d..f8e812d 100644 --- a/src/main/resources/version-dependent/master/menus/tinkerer-menu.yml +++ b/src/main/resources/version-dependent/master/menus/tinkerer-menu.yml @@ -12,33 +12,42 @@ slots: "(9,14) (10,15) (11,16) (12,17) contents: accept-left: - material: "LIME_DYE" + material: "INK_SACK" + data: 10 display-name: "&eClick to accept trade" slot: 45 accept-right: - material: "LIME_DYE" + material: "INK_SACK" data: 10 display-name: "&eClick to accept trade" slot: 53 deposit-all: - material: "SUNFLOWER" + material: "DOUBLE_PLANT" display-name: "&l&eDeposit All" lore: - "&7Click to deposit all tinkerable items." slot: 49 explanation: material: PAINTING - slot: 4 + display-name: "&6&lTinkerer" + lore: + - "&6Click &7to insert the books you would" + - "&7like to &6deposit&7." + - "" + - "&7The &6left &7is the items you are &6depositing&7." + - "&7The &6right &7is the items you are &6receiving&7." corners: - material: BLUE_STAINED_GLASS_PANE + material: STAINED_GLASS_PANE + data: 11 display-name: "&r" slot: "0,1,7,8,46,52" edge: - material: LIGHT_BLUE_STAINED_GLASS_PANE + material: STAINED_GLASS_PANE + data: 3 display-name: "&r" slot: "2,3,5,6,47,48,50,51" line: - material: WHITE_STAINED_GLASS_PANE + material: STAINED_GLASS_PANE display-name: "&r" slot: "13,22,31,40"