mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-24 13:34:53 +02:00
Give InventoryClickEvent the proper inventory for drag clicks
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
e71c420fa8
commit
b9746a0574
|
@ -239,7 +239,7 @@ public final class InventoryClickProcessor {
|
||||||
finalCursorAmount -= slotSize;
|
finalCursorAmount -= slotSize;
|
||||||
}
|
}
|
||||||
inv.setItemStack(s, slotItem);
|
inv.setItemStack(s, slotItem);
|
||||||
callClickEvent(player, inventory, s, ClickType.LEFT_DRAGGING, slotItem, cursor);
|
callClickEvent(player, inv, s, ClickType.LEFT_DRAGGING, slotItem, cursor);
|
||||||
}
|
}
|
||||||
// Update the cursor
|
// Update the cursor
|
||||||
clickResult.setCursor(stackingRule.apply(cursor, finalCursorAmount));
|
clickResult.setCursor(stackingRule.apply(cursor, finalCursorAmount));
|
||||||
|
@ -284,7 +284,7 @@ public final class InventoryClickProcessor {
|
||||||
finalCursorAmount -= 1;
|
finalCursorAmount -= 1;
|
||||||
}
|
}
|
||||||
inv.setItemStack(s, slotItem);
|
inv.setItemStack(s, slotItem);
|
||||||
callClickEvent(player, inventory, s, ClickType.RIGHT_DRAGGING, slotItem, cursor);
|
callClickEvent(player, inv, s, ClickType.RIGHT_DRAGGING, slotItem, cursor);
|
||||||
}
|
}
|
||||||
// Update the cursor
|
// Update the cursor
|
||||||
clickResult.setCursor(stackingRule.apply(cursor, finalCursorAmount));
|
clickResult.setCursor(stackingRule.apply(cursor, finalCursorAmount));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user