mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-14 22:56:31 +01:00
Fix double click inside player inventory
This commit is contained in:
parent
fbf8ddefce
commit
edaec0cb6d
@ -403,16 +403,11 @@ public class PlayerInventory extends AbstractInventory implements EquipmentHandl
|
||||
public boolean doubleClick(@NotNull Player player, int slot) {
|
||||
final ItemStack cursor = getCursorItem();
|
||||
final InventoryClickResult clickResult = clickProcessor.doubleClick(this, null, player, slot, cursor);
|
||||
|
||||
if (clickResult == null)
|
||||
return false;
|
||||
|
||||
if (clickResult.doRefresh())
|
||||
update();
|
||||
|
||||
setItemStack(slot, OFFSET, clickResult.getClicked());
|
||||
setCursorItem(clickResult.getCursor());
|
||||
|
||||
return !clickResult.isCancel();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user