SteamWar/SpigotCore
Archiviert
13
0

Inventory Improvements #113

Zusammengeführt
Lixfel hat 7 Commits von inventory_2 nach master 2021-09-27 17:11:46 +02:00 zusammengeführt
Nur Änderungen aus Commit 8fbb16557c werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -97,31 +97,31 @@ public class SWInventory implements Listener {
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);
callbacks.put(pos, c);
}
public void setItem(int pos, Material m, String name, Consumer<InventoryClickEvent> c) {
setItem(pos, m, name, new ArrayList<>(), false, c);
public void setItemEvent(int pos, Material m, String name, Consumer<InventoryClickEvent> c) {
setItemEvent(pos, m, name, new ArrayList<>(), false, c);
}
public void setItem(int pos, Material m, byte meta, String name, Consumer<InventoryClickEvent> c) {
setItem(pos, m, meta, name, new ArrayList<>(), false, c);
public void setItemEvent(int pos, Material m, byte meta, String name, Consumer<InventoryClickEvent> 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) {
setItem(pos, m, (byte) 0, name, lore, e, c);
public void setItemEvent(int pos, Material m, String name, List<String> lore, boolean e, Consumer<InventoryClickEvent> 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 -> {
});
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);
}