mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
fix(bukkit): 无法鼠标中键获取物品的问题
- 在 PacketConsumers 类中修复了物品获取逻辑的错误
This commit is contained in:
@@ -397,7 +397,7 @@ public class PacketConsumers {
|
||||
ItemStack previous = inventory.getItem(targetSlot);
|
||||
ItemUtils.setItem(inventory, targetSlot, picked.clone());
|
||||
if (previous != null) {
|
||||
ItemUtils.setItem(inventory, targetSlot, previous);
|
||||
ItemUtils.setItem(inventory, matchingSlot, previous);
|
||||
} else {
|
||||
picked.setAmount(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user