forked from SteamWar/SteamWar
Fix MWTeam.leave not distributing items correctly
This commit is contained in:
@@ -184,6 +184,7 @@ public class MWTeam {
|
||||
|
||||
public void leave(Player p) {
|
||||
if (!players.contains(p)) return;
|
||||
players.remove(p);
|
||||
|
||||
for (ItemStack stack : p.getInventory().getContents()) {
|
||||
if (stack == null) continue;
|
||||
@@ -198,7 +199,6 @@ public class MWTeam {
|
||||
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)
|
||||
MissileWars.end(WinReasons.NO_ENEMY, enemy());
|
||||
|
||||
players.remove(p);
|
||||
sbteam.removePlayer(p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user