diff --git a/build.gradle.kts b/build.gradle.kts index 70420bb0..82f870ca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -97,7 +97,7 @@ allprojects { testCompileOnly("org.projectlombok:lombok:1.18.36") testAnnotationProcessor("org.projectlombok:lombok:1.18.36") - implementation("dev.triumphteam:triumph-gui:3.1.12-SNAPSHOT") { + implementation("dev.triumphteam:triumph-gui:3.2.0-SNAPSHOT") { exclude("net.kyori") // Already have adventure API } implementation("com.owen1212055:particlehelper:1.0.0-SNAPSHOT") diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/Menu.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/Menu.java index e720674c..4186c0e7 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/Menu.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/Menu.java @@ -57,7 +57,7 @@ public class Menu { private final boolean shading; public Menu(String id, @NotNull ConfigurationNode config) { - this.id = id; + this.id = config.node("id").getString(id); this.config = config; title = config.node("title").getString("chest"); @@ -154,8 +154,7 @@ public class Menu { Gui gui = Gui.gui() .title(component) .type(GuiType.CHEST) - .rows(this.rows) - .inventory((title, owner, rows) -> Bukkit.createInventory(owner, rows, title)) + .inventory((title, owner, type) -> Bukkit.createInventory(owner, rows * 9, title)) .create(); gui.setDefaultClickAction(event -> event.setCancelled(true)); @@ -248,7 +247,7 @@ public class Menu { } } MessagesUtil.sendDebugMessages("Updated menu with title " + title); - gui.updateTitle(StringUtils.parseStringToString(Hooks.processPlaceholders(viewer, title.toString()))); + gui.updateTitle(AdventureUtils.MINI_MESSAGE.deserialize(Hooks.processPlaceholders(viewer, title.toString()))); } else { for (int i = 0; i < gui.getInventory().getSize(); i++) { if (items.containsKey(i)) {