SteamWar/FightSystem
Archiviert
13
1

Showing Kit Item only with more than 1 Kit availible

Dieser Commit ist enthalten in:
Lixfel 2019-07-12 06:20:02 +02:00
Ursprung 34048932a3
Commit 5ca80bf283

Datei anzeigen

@ -106,7 +106,8 @@ public class FightTeam {
player.setGameMode(GameMode.ADVENTURE);
player.teleport(spawn);
player.getInventory().setItem(1, new ItemBuilder(Material.LEATHER_CHESTPLATE).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§eKit wählen").build());
if(KitManager.getKits(false).size() > 1)
player.getInventory().setItem(1, new ItemBuilder(Material.LEATHER_CHESTPLATE).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§eKit wählen").build());
TechHider.reloadChunks(player, chunksToReload);
return fightPlayer;
}
@ -155,6 +156,10 @@ public class FightTeam {
leader.setKit(KitManager.getKitByName(Config.LeaderDefault));
Inventory inventory = leader.getPlayer().getInventory();
inventory.setItem(0, new ItemBuilder(Material.PAPER).removeAllAtributs().setDisplayName("§eSpieler einladen").build());
if(KitManager.getKits(true).size() > 1)
inventory.setItem(1, new ItemBuilder(Material.LEATHER_CHESTPLATE).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§eKit wählen").build());
else
inventory.setItem(1, new ItemBuilder(Material.AIR).build());
inventory.setItem(2, new ItemBuilder(Material.FIREWORK_CHARGE).removeAllAtributs().setDisplayName("§cSpieler rauswerfen").build());
inventory.setItem(3, new ItemBuilder(Material.INK_SACK, (short) 10).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build());
inventory.setItem(5, new ItemBuilder(Material.INK_SACK, (short) 1).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§4Abbrechen").build());