Skip to content

Commit 4426126

Browse files
Fix Inventory#setItemAmount return value ignoring max stack size if no events called
1 parent c70e58a commit 4426126

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

invui/src/main/java/xyz/xenondevs/invui/inventory/Inventory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ public int setItemAmount(@Nullable UpdateReason updateReason, int slot, int amou
965965
} else {
966966
setDirectBackingItem(slot, newItemStack); // already cloned above
967967
notifyWindows(slot);
968-
return amount;
968+
return newItemStack != null ? newItemStack.getAmount() : 0;
969969
}
970970

971971
return currentStack.getAmount();

0 commit comments

Comments
 (0)