Merge pull request #15 from D0gmaDev/main

fixes wrong array check (fixes #14)
This commit is contained in:
StudioCode 2022-12-22 22:06:48 +01:00 committed by GitHub
commit 0349f043cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -526,7 +526,7 @@ public abstract class BaseGUI implements GUI, Controllable {
@Override @Override
public void addItems(@NotNull Item... items) { public void addItems(@NotNull Item... items) {
for (Item item : items) { for (Item item : items) {
int emptyIndex = ArrayUtils.findFirstEmptyIndex(items); int emptyIndex = ArrayUtils.findFirstEmptyIndex(slotElements);
if (emptyIndex == -1) break; if (emptyIndex == -1) break;
setItem(emptyIndex, item); setItem(emptyIndex, item);
} }