Ignore air when shift clicking

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-16 19:21:36 +02:00
parent ba8da0647e
commit be4542e936

View File

@ -149,6 +149,8 @@ public final class InventoryClickProcessor {
final var pair = TransactionType.ADD.process(targetInventory, clicked, (index, itemStack) -> {
if (inventory == targetInventory && index == slot)
return false; // Prevent item lose/duplication
if (itemStack.isAir())
return false; // Ignore air click
InventoryClickResult result = startCondition(player, targetInventory, index, ClickType.SHIFT_CLICK, itemStack, cursor);
if (result.isCancel()) {
return false;