9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

Merge pull request #174 from HibiscusMC/minor-tweaks

Minor tweaks
This commit is contained in:
Logan
2025-04-26 09:39:00 -05:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ allprojects {
testCompileOnly("org.projectlombok:lombok:1.18.36") testCompileOnly("org.projectlombok:lombok:1.18.36")
testAnnotationProcessor("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 exclude("net.kyori") // Already have adventure API
} }
implementation("com.owen1212055:particlehelper:1.0.0-SNAPSHOT") implementation("com.owen1212055:particlehelper:1.0.0-SNAPSHOT")

View File

@@ -57,7 +57,7 @@ public class Menu {
private final boolean shading; private final boolean shading;
public Menu(String id, @NotNull ConfigurationNode config) { public Menu(String id, @NotNull ConfigurationNode config) {
this.id = id; this.id = config.node("id").getString(id);
this.config = config; this.config = config;
title = config.node("title").getString("chest"); title = config.node("title").getString("chest");
@@ -154,8 +154,7 @@ public class Menu {
Gui gui = Gui.gui() Gui gui = Gui.gui()
.title(component) .title(component)
.type(GuiType.CHEST) .type(GuiType.CHEST)
.rows(this.rows) .inventory((title, owner, type) -> Bukkit.createInventory(owner, rows * 9, title))
.inventory((title, owner, rows) -> Bukkit.createInventory(owner, rows, title))
.create(); .create();
gui.setDefaultClickAction(event -> event.setCancelled(true)); gui.setDefaultClickAction(event -> event.setCancelled(true));
@@ -248,7 +247,7 @@ public class Menu {
} }
} }
MessagesUtil.sendDebugMessages("Updated menu with title " + title); 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 { } else {
for (int i = 0; i < gui.getInventory().getSize(); i++) { for (int i = 0; i < gui.getInventory().getSize(); i++) {
if (items.containsKey(i)) { if (items.containsKey(i)) {