Skip to content
This repository was archived by the owner on Jul 24, 2021. It is now read-only.

Commit d126846

Browse files
authored
🐛 The close consumer is now correctly executed
1 parent 2cb6717 commit d126846

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/fr/bakaaless/api/inventory/InventoryAPI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,10 @@ private Inventory generate() {
477477

478478
@EventHandler
479479
public void onClose(final InventoryCloseEvent e) {
480-
if (e.getView().getTopInventory().equals(this.inventory))
480+
if (e.getView().getTopInventory().equals(this.inventory)) {
481481
this.stop();
482+
this.closeEvent.accept(e);
483+
}
482484
if (!e.getInventory().equals(this.inventory))
483485
return;
484486
if (e.getInventory().getHolder() == null) {

0 commit comments

Comments
 (0)