Skip to content

Commit ba27519

Browse files
committed
Use dedicated slot constant for public kit loading
- Add `LOAD_PUBLIC_KIT_SLOT` in layout constants - Wire LOAD KIT button and handler to the new slot constant in `GUI`
1 parent 56e9387 commit ba27519

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/dev/noah/perplayerkit/gui/GUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ public Menu ViewPublicKitMenu(Player p, String id) {
326326
menu.getSlot(i + 9).setItem(kit[i]);
327327
}
328328

329-
menu.getSlot(CLEAR_SLOT).setItem(createItem(Material.APPLE, 1, "<green><b>LOAD KIT</b></green>"));
329+
menu.getSlot(LOAD_PUBLIC_KIT_SLOT).setItem(createItem(Material.APPLE, 1, "<green><b>LOAD KIT</b></green>"));
330330
menu.getSlot(BACK_SLOT).setItem(createItem(Material.OAK_DOOR, 1, "<red><b>BACK</b></red>"));
331331
addPublicKitMenu(menu.getSlot(BACK_SLOT));
332-
addLoadPublicKit(menu.getSlot(CLEAR_SLOT), id);
332+
addLoadPublicKit(menu.getSlot(LOAD_PUBLIC_KIT_SLOT), id);
333333

334334
menu.open(p);
335335

src/main/java/dev/noah/perplayerkit/gui/GuiLayoutUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public final class GuiLayoutUtils {
3434
public static final int ARMOR_INDICATOR_START = 45;
3535
public static final int OFFHAND_INDICATOR_SLOT = 49;
3636
public static final int IMPORT_SLOT = 51;
37+
public static final int LOAD_PUBLIC_KIT_SLOT = 52;
3738
public static final int CLEAR_SLOT = 52;
3839
public static final int BACK_SLOT = 53;
3940

0 commit comments

Comments
 (0)