From c9c6529bdff43881793f856372bd68caea712051 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 10 Feb 2020 13:08:11 +0100 Subject: [PATCH] Give Ready-Button in Eventmode for faster startup Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/fight/FightTeam.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java b/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java index bf00e39..eba1c81 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java @@ -186,6 +186,9 @@ public class FightTeam implements IFightTeam{ public void setLeader(FightPlayer leader) { this.leader = leader; + if(ready) + setReady(false); + if (leader == null){ if(!players.isEmpty()) { setLeader(players.iterator().next()); @@ -206,9 +209,10 @@ public class FightTeam implements IFightTeam{ if(!Config.event()){ inventory.setItem(2, new ItemBuilder(Material.PAPER).removeAllAttributs().setDisplayName("§eSpieler einladen").build()); inventory.setItem(3, new ItemBuilder(SWItem.getMaterial("FIREWORK_CHARGE")).removeAllAttributs().setDisplayName("§cSpieler rauswerfen").build()); - inventory.setItem(4, new ItemBuilder(SWItem.getDye(10), (short) 10).removeAllAttributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build()); } + inventory.setItem(4, new ItemBuilder(SWItem.getDye(10), (short) 10).removeAllAttributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build()); + if(Config.test() || FightSystem.getFightState() != FightState.POST_SCHEM_SETUP) inventory.setItem(0, new ItemBuilder(SWItem.getMaterial("CAULDRON_ITEM")).removeAllAttributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§e" + Config.GameName + " wählen").build()); }