Backwards
Dieser Commit ist enthalten in:
Ursprung
336d697d9e
Commit
8fbb16557c
@ -97,31 +97,31 @@ public class SWInventory implements Listener {
|
|||||||
callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent.getClick()));
|
callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent.getClick()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int pos, ItemStack itemStack, Consumer<InventoryClickEvent> c) {
|
public void setItemEvent(int pos, ItemStack itemStack, Consumer<InventoryClickEvent> c) {
|
||||||
inventory.setItem(pos, itemStack);
|
inventory.setItem(pos, itemStack);
|
||||||
callbacks.put(pos, c);
|
callbacks.put(pos, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int pos, Material m, String name, Consumer<InventoryClickEvent> c) {
|
public void setItemEvent(int pos, Material m, String name, Consumer<InventoryClickEvent> c) {
|
||||||
setItem(pos, m, name, new ArrayList<>(), false, c);
|
setItemEvent(pos, m, name, new ArrayList<>(), false, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int pos, Material m, byte meta, String name, Consumer<InventoryClickEvent> c) {
|
public void setItemEvent(int pos, Material m, byte meta, String name, Consumer<InventoryClickEvent> c) {
|
||||||
setItem(pos, m, meta, name, new ArrayList<>(), false, c);
|
setItemEvent(pos, m, meta, name, new ArrayList<>(), false, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int pos, Material m, String name, List<String> lore, boolean e, Consumer<InventoryClickEvent> c) {
|
public void setItemEvent(int pos, Material m, String name, List<String> lore, boolean e, Consumer<InventoryClickEvent> c) {
|
||||||
setItem(pos, m, (byte) 0, name, lore, e, c);
|
setItemEvent(pos, m, (byte) 0, name, lore, e, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int pos, Material m, byte meta, String name, List<String> lore, boolean e, Consumer<InventoryClickEvent> c) {
|
public void setItemEvent(int pos, Material m, byte meta, String name, List<String> lore, boolean e, Consumer<InventoryClickEvent> c) {
|
||||||
SWItem item = new SWItem(m, meta, name, lore, e, click -> {
|
SWItem item = new SWItem(m, meta, name, lore, e, click -> {
|
||||||
});
|
});
|
||||||
setItem(pos, item);
|
setItem(pos, item);
|
||||||
setCallback(pos, c);
|
setEventCallback(pos, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCallback(int pos, Consumer<InventoryClickEvent> c) {
|
public void setEventCallback(int pos, Consumer<InventoryClickEvent> c) {
|
||||||
callbacks.put(pos, c);
|
callbacks.put(pos, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren