SteamWar/FightSystem
Archiviert
13
1

Fix 1.16 item selection

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-07-25 11:13:20 +02:00
Ursprung b13362176c
Commit f441f76f62

Datei anzeigen

@ -101,13 +101,19 @@ public class GUI {
}
SWInventory inv = new SWInventory(p, 9, Config.GameName + "-Auswahl");
inv.setItem(8, Material.REDSTONE, "§eÖffentliches " + Config.GameName, (ClickType click) -> schemDialog(p, true));
inv.setItem(8, Material.REDSTONE, "§eÖffentliches " + Config.GameName, (ClickType click) -> {
p.closeInventory();
schemDialog(p, true);
});
if(Fight.getMaxRank() == 0){
inv.setItem(0, SWItem.getDye(8), (byte)8, "§7Keine privaten Schematics erlaubt", (ClickType click)->{});
}else if(Schematic.getSchemsOfType(p.getUniqueId(), Config.SchematicType).isEmpty() && !Config.test()){
inv.setItem(0, SWItem.getDye(8), (byte)8, "§7Kein privates " + Config.GameName + " vorhanden", (ClickType click)->{});
}else{
inv.setItem(0, SWItem.getMaterial("CAULDRON_ITEM"), "§ePrivates " + Config.GameName, (ClickType click) -> schemDialog(p, false));
inv.setItem(0, SWItem.getMaterial("CAULDRON_ITEM"), "§ePrivates " + Config.GameName, (ClickType click) -> {
p.closeInventory();
schemDialog(p, false);
});
}
inv.setCallback(-999, (ClickType click) -> p.closeInventory());
inv.open();