mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-23 16:41:35 +01:00
Merge branch 'master' into new-block-api
This commit is contained in:
commit
e95cc4d295
@ -403,16 +403,11 @@ public class PlayerInventory extends AbstractInventory implements EquipmentHandl
|
|||||||
public boolean doubleClick(@NotNull Player player, int slot) {
|
public boolean doubleClick(@NotNull Player player, int slot) {
|
||||||
final ItemStack cursor = getCursorItem();
|
final ItemStack cursor = getCursorItem();
|
||||||
final InventoryClickResult clickResult = clickProcessor.doubleClick(this, null, player, slot, cursor);
|
final InventoryClickResult clickResult = clickProcessor.doubleClick(this, null, player, slot, cursor);
|
||||||
|
|
||||||
if (clickResult == null)
|
if (clickResult == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (clickResult.doRefresh())
|
if (clickResult.doRefresh())
|
||||||
update();
|
update();
|
||||||
|
|
||||||
setItemStack(slot, OFFSET, clickResult.getClicked());
|
|
||||||
setCursorItem(clickResult.getCursor());
|
setCursorItem(clickResult.getCursor());
|
||||||
|
|
||||||
return !clickResult.isCancel();
|
return !clickResult.isCancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user