mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-09-14 11:16:46 +08:00
fix no closing inventory when there is no item to replenish
This commit is contained in:
parent
28e5b32d7b
commit
fd697c938d
@ -215,14 +215,12 @@ public class ReplenishListener implements Listener {
|
||||
);
|
||||
if (!event.callEvent()) {
|
||||
// 无法操作箱子
|
||||
target.closeInventory(InventoryCloseEvent.Reason.PLAYER);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
target.getInventory().setItem(slot, replacement);
|
||||
inv.setItem(i, null);
|
||||
target.closeInventory(InventoryCloseEvent.Reason.PLAYER);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
target.closeInventory(InventoryCloseEvent.Reason.PLAYER);
|
||||
|
Loading…
Reference in New Issue
Block a user