Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit f59e6f7

Browse files
add method update()
1 parent 66066b3 commit f59e6f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/tech/bingulhan/hanguiapi/gui/HanGuiBuilder.java

+14
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,20 @@ public final void open() {
202202
}
203203
}
204204

205+
public final void update() {
206+
inventory.clear();
207+
for (int slot : itemHashMap.keySet()) {
208+
if (slot > size.size) {
209+
continue;
210+
}
211+
212+
GuiItem item = itemHashMap.get(slot);
213+
214+
ItemStack itemStack = new ItemStack(item.getItem());
215+
216+
inventory.setItem(slot, itemStack);
217+
}
218+
}
205219
public enum Size {
206220
ONE(9),DOUBLE(18),THREE(27),FOUR(36),FIVE(45),SIX(54);
207221
public int size;

0 commit comments

Comments
 (0)