mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
@@ -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")
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user