SteamWar/SpigotCore
Archiviert
13
0

Add Custom Callbacks for SWListInv
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2022-10-28 21:16:21 +02:00
Ursprung 02d47a3157
Commit 7726948a06

Datei anzeigen

@ -55,8 +55,10 @@ public class SWListInv<T> extends SWInventory {
public void open(){ public void open(){
opened = true; opened = true;
inventory.clear(); inventory.clear();
callbacks.clear(); callbacks.keySet().stream().filter(i -> i < 0).forEach(callbacks::remove);
if(!callbacks.containsKey(-999)) {
setCallback(-999, (ClickType click) -> player.closeInventory()); setCallback(-999, (ClickType click) -> player.closeInventory());
}
if (sizeBiggerMax()) { if (sizeBiggerMax()) {
if (page != 0) { if (page != 0) {