mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-30 03:51:20 +01:00
Ignore air when shift clicking
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
ba8da0647e
commit
be4542e936
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user