Skip to content

Commit

Permalink
1.8-specific floating inventory fix (#62)
Browse files Browse the repository at this point in the history
It's possible to get your inventory into a floating state where multiple virtual "inventories" are active.

This doesn't directly solve that issue, but ensures that no actions are run if the clicked inventory is not the Helper GUI.
  • Loading branch information
FerusGrim authored Feb 8, 2020
1 parent 3a9cf68 commit 9d11472
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helper/src/main/java/me/lucko/helper/menu/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ private void startListening() {

if (!isValid()) {
close();
return;
}

if (!e.getInventory().equals(this.inventory)) {
return;
}

int slotId = e.getRawSlot();
Expand Down

0 comments on commit 9d11472

Please sign in to comment.