Skip to content

Commit

Permalink
Merge pull request #155 from SpaceServerUniverse/dev/m1sk9-improve-menu
Browse files Browse the repository at this point in the history
feat: Add receive menu
  • Loading branch information
OneWalkDev authored Oct 15, 2024
2 parents 6d90878 + d0a42fa commit 86d7dbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/main/java/space/yurisi/universecorev2/menu/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import xyz.xenondevs.invui.item.impl.SimpleItem;
import xyz.xenondevs.invui.window.Window;

import java.time.LocalTime;
import java.util.Arrays;
import java.util.List;

public class MainMenu implements BaseMenu {
Expand Down Expand Up @@ -67,12 +65,16 @@ public void sendMenu(Player player) {
.setDisplayName("弾薬")
.setLegacyLore(List.of("§6弾薬を購入・クラフトします")),
"/ammo");
Item executeReceive = new CommandItem(new ItemBuilder(Material.CHEST)
.setDisplayName("報酬受け取り")
.setLegacyLore(List.of("§6報酬受け取りメニューを開きます")),
"/receive");

Gui gui = Gui.normal()
.setStructure(
"# # # i # = # # #",
"# + a m t o y + #",
"# + + n s h + + #",
"# + + n s h p + #",
"# # # # l # # # #"
)
.addIngredient('#', border)
Expand All @@ -87,6 +89,7 @@ public void sendMenu(Player player) {
.addIngredient('s', executeTrash)
.addIngredient('h', executeHead)
.addIngredient('o', executeAmmo)
.addIngredient('p', executeReceive)
.addIngredient('l', new LaunchNavigationItem())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
import space.yurisi.universecorev2.menu.MainMenu;
import xyz.xenondevs.invui.item.ItemProvider;
import xyz.xenondevs.invui.item.builder.ItemBuilder;
import xyz.xenondevs.invui.item.impl.AbstractItem;
Expand Down

0 comments on commit 86d7dbb

Please sign in to comment.