SteamWar/SpigotCore
Archiviert
13
0

After Fixes #117

Zusammengeführt
Lixfel hat 3 Commits von inventory_2 nach master 2021-09-28 22:22:23 +02:00 zusammengeführt

Datei anzeigen

@ -68,13 +68,17 @@ public class SWInventory implements Listener {
callbacks.put(-1, inventoryClickEvent -> c.clicked(null));
}
public void addCloseRunable(Runnable c) {
public void addCloseRunnable(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()));
if(c != null) {
callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent.getClick()));
} else {
callbacks.remove(pos);
}
}
public void setItem(int pos, SWItem item) {