Merge pull request 'After Fixes' (#117) from inventory_2 into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #117 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
d76267ee01
@ -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) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren