From e0a86269e0da88665db05074f3912b4d7c8ea036 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 27 Sep 2021 17:06:50 +0200 Subject: [PATCH] Add --- SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java b/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java index 74a599b..be75f28 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java @@ -68,6 +68,10 @@ public class SWInventory implements Listener { callbacks.put(-1, inventoryClickEvent -> c.clicked(null)); } + public void addCloseRunable(Runnable c) { + callbacks.put(-1, inventoryClickEvent -> c.run()); + } + public void setItem(int pos, ItemStack itemStack, InvCallback c) { inventory.setItem(pos, itemStack); callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent.getClick()));