Fix double click inside player inventory

This commit is contained in:
TheMode 2021-06-27 05:44:24 +02:00
parent fbf8ddefce
commit edaec0cb6d

View File

@ -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();
}
}