Skip to content

Commit

Permalink
fix: disable "other" gui actions.
Browse files Browse the repository at this point in the history
Fixes an issue where you could double-click stack to collect unstacked items without edit perms.

Unfortunately this breaks pick block on creative without edit permission, but this is  considered a necessary compromise.

(cherry picked from commit 92c371e)
  • Loading branch information
WiIIiam278 committed Nov 14, 2024
1 parent 159415a commit 931fdc5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void showGui(@NotNull Data.Items items, @NotNull MineDown title, boolean
if (!editable) {
builder.disableAllInteractions();
}
final StorageGui gui = builder.enableOtherActions()
final StorageGui gui = builder
.apply(a -> a.getInventory().setContents(contents))
.title(title.toComponent()).create();
gui.setCloseGuiAction((close) -> onClose.accept(BukkitData.Items.ItemArray.adapt(
Expand Down

0 comments on commit 931fdc5

Please sign in to comment.