SteamWar/SpigotCore
Archiviert
13
0
Dieser Commit ist enthalten in:
Lixfel 2020-12-22 08:36:38 +01:00
Ursprung 1e6c349880
Commit dc92ce6fda
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -37,10 +37,9 @@ import java.util.Map;
public class SWInventory implements Listener { public class SWInventory implements Listener {
final Player player; final Player player;
private final Map<Integer, InvCallback> callbacks = new HashMap<>(); final Map<Integer, InvCallback> callbacks = new HashMap<>();
final Inventory inventory; final Inventory inventory;
public SWInventory(Player p, int size, String t){ public SWInventory(Player p, int size, String t){
player = p; player = p;
inventory = Bukkit.createInventory(p, size, t); inventory = Bukkit.createInventory(p, size, t);

Datei anzeigen

@ -46,13 +46,15 @@ public class SWListInv<T> extends SWInventory {
callback = c; callback = c;
elements = l; elements = l;
page = 0; page = 0;
setCallback(-999, (ClickType click) -> player.closeInventory());
} }
@Override @Override
public void open(){ public void open(){
opened = true; opened = true;
inventory.clear(); inventory.clear();
callbacks.clear();
setCallback(-999, (ClickType click) -> player.closeInventory());
if(elements.size() > 54){ if(elements.size() > 54){
if(page != 0) if(page != 0)
setItem(45, SWItem.getDye(10), (byte)10, "§eSeite zurück", (ClickType click) -> { setItem(45, SWItem.getDye(10), (byte)10, "§eSeite zurück", (ClickType click) -> {