Skip to content

Commit

Permalink
Fix cyclical packets with HotbarGui (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells authored Sep 3, 2024
1 parent 28fd570 commit cb30e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/eu/pb4/sgui/api/gui/HotbarGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ private void openScreenHandler() {
/**
* It's run after player changes selected slot. It can also block switching by returning false
*
* @param slot new selected slot
* @param slot the newly selected slot
* @return true to allow or false for canceling switching
*/
public boolean onSelectedSlotChange(int slot) {
this.setSelectedSlot(slot);
this.selectedSlot = MathHelper.clamp(slot, 0, 8);
return true;
}

Expand Down

0 comments on commit cb30e83

Please sign in to comment.