Skip to content

Commit

Permalink
fix: increment column and replace properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rooooose-b committed Jul 3, 2024
1 parent ac86518 commit 2f1bef9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ private static void replaceSkillRow(Gui gui, int[] ids, HashMap<Integer, Boolean

private static void replaceSkillRowAndColumn(Gui gui, int[] ids, HashMap<Integer, Boolean> hasSkill, int limit) {
int col = 3;
int col2 = 3;
for (int i : ids) {
if (hasSkill.get(i)) {
ItemStack originalIcon = skillsManager.skills.get(i).getIcon();
Expand All @@ -143,10 +144,15 @@ private static void replaceSkillRowAndColumn(Gui gui, int[] ids, HashMap<Integer
row = 2;
}

gui.setItem(row, col, ItemBuilder.from(icon).asGuiItem());
if (i > limit)
gui.setItem(row, col, ItemBuilder.from(icon).asGuiItem());
else
gui.setItem(row, col2, ItemBuilder.from(icon).asGuiItem());
}
if (i > limit) {
col++;
} else {
col2++;
}
}
}
Expand Down

0 comments on commit 2f1bef9

Please sign in to comment.