Skip to content

Commit

Permalink
Fix: selection gui throws an exception when players clicked nowhere
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Oct 16, 2024
1 parent c7fd058 commit 1c0a564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/dev/tylerm/khs/gui/SkillSelectionGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void onClick(InventoryClickEvent event) {
return;
}
event.setCancelled(true);
if(event.getRawSlot() > gui.skills.size())return;
if(event.getRawSlot() < 0 || event.getRawSlot() > gui.skills.size())return;
var skill = gui.skills.get(event.getRawSlot());
if (skill == null) {
return;
Expand Down

0 comments on commit 1c0a564

Please sign in to comment.