From b8343b5aa6323a0cde63ec2c565d393b106b9539 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 27 Oct 2021 20:23:41 +0200 Subject: [PATCH] Update MissileWars.waiting --- src/de/steamwar/misslewars/MWTeam.java | 5 +++++ src/de/steamwar/misslewars/MissileWars.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/misslewars/MWTeam.java b/src/de/steamwar/misslewars/MWTeam.java index a540212..886b05a 100644 --- a/src/de/steamwar/misslewars/MWTeam.java +++ b/src/de/steamwar/misslewars/MWTeam.java @@ -161,6 +161,11 @@ public class MWTeam { MissileWars.end(WinReasons.NO_ENEMY, enemy()); } + public void reset() { + players.clear(); + openInvitations.clear(); + } + public void invitePlayer(Player p) { if (enemy().openInvitations.contains(p)) return; openInvitations.add(p); diff --git a/src/de/steamwar/misslewars/MissileWars.java b/src/de/steamwar/misslewars/MissileWars.java index 985a524..6194811 100644 --- a/src/de/steamwar/misslewars/MissileWars.java +++ b/src/de/steamwar/misslewars/MissileWars.java @@ -93,8 +93,8 @@ public class MissileWars extends JavaPlugin { fightState = FightState.WAITING; StateDependent.setupState(fightState); - redTeam = new MWTeam(ChatColor.RED, Config.RedSpawn, "Rot", Config.RedPortalZ); - blueTeam = new MWTeam(ChatColor.DARK_AQUA, Config.BlueSpawn, "Blau", Config.BluePortalZ); + redTeam.reset(); + blueTeam.reset(); } }