aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java')
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java b/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
index ea75c43..79cc08d 100644
--- a/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
+++ b/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
@@ -1,6 +1,6 @@
package dev.mayaqq.ygasi.gui;
-import dev.mayaqq.ygasi.util.GetAdvancementProgress;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.sgui.api.elements.GuiElementBuilder;
import net.minecraft.item.Items;
import net.minecraft.screen.ScreenHandlerType;
@@ -13,14 +13,14 @@ import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
public class MercenaryGui {
public static void gui(ServerPlayerEntity player) {
try {
- if (!GetAdvancementProgress.get(player, "mercenary")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "mercenary")) {
player.sendMessage(Text.of("§cYou have not unlocked this branch yet!"), false);
BranchGui.gui(player);
} else {
SkillGui gui = new SkillGui(ScreenHandlerType.GENERIC_9X6, player, false) {};
gui.setTitle(Text.of( "§c§lMercenary " + "§3Skill Points: " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS))));
-
+ //background items
for (int x = 0; x <= 53; x++) {
gui.setSlot(x, new GuiElementBuilder()
.setItem(Items.GRAY_STAINED_GLASS_PANE)
@@ -28,6 +28,12 @@ public class MercenaryGui {
);
}
+ //skill items
+ gui.setSlot(49, new GuiElementBuilder()
+ .setItem(Items.DIAMOND_BLOCK)
+ .setName(Text.of("§c§lMercenary Unlocked!"))
+ .addLoreLine(Text.of("§3Skill Points: " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS))))
+ );
gui.open();
}