Skip to content

Commit df09fe7

Browse files
authored
Fix index check for history slots in BlockGUIHandler
1 parent 14dc3b5 commit df09fe7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/cz/devfire/mysteryblocks/Block/Handler/GUI/BlockGUIHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void open(Player player) {
124124
BlockHistoryHandler historyHandler = mysteryBlock.getHistoryHandler();
125125
if (historyHandler.isEnabled()) {
126126
for (int j = 0; j < historyHandler.getSaveCount(); j++) {
127-
if (j > historyHandler.getHistorySlots().length) continue;
127+
if (j >= historyHandler.getHistorySlots().length) continue;
128128
int slot = historyHandler.getHistorySlots()[j];
129129

130130
ItemStack stack = new ItemStack(historyHandler.getHistoryItem());
@@ -146,4 +146,4 @@ public void open(Player player) {
146146
player.openInventory(inventory);
147147
viewers.add(player);
148148
}
149-
}
149+
}

0 commit comments

Comments
 (0)