forked from SteamWar/SteamWar
Hotfix ELO on leave
This commit is contained in:
@@ -185,7 +185,6 @@ public class MWTeam {
|
|||||||
public void leave(Player p) {
|
public void leave(Player p) {
|
||||||
if (!players.contains(p)) return;
|
if (!players.contains(p)) return;
|
||||||
|
|
||||||
players.remove(p);
|
|
||||||
for (ItemStack stack : p.getInventory().getContents()) {
|
for (ItemStack stack : p.getInventory().getContents()) {
|
||||||
if (stack == null) continue;
|
if (stack == null) continue;
|
||||||
if (stack.getType() == Material.AIR) continue;
|
if (stack.getType() == Material.AIR) continue;
|
||||||
@@ -196,9 +195,11 @@ public class MWTeam {
|
|||||||
p.getInventory().clear();
|
p.getInventory().clear();
|
||||||
|
|
||||||
p.setDisplayName("§7" + p.getName());
|
p.setDisplayName("§7" + p.getName());
|
||||||
sbteam.removePlayer(p);
|
|
||||||
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)
|
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)
|
||||||
MissileWars.end(WinReasons.NO_ENEMY, enemy());
|
MissileWars.end(WinReasons.NO_ENEMY, enemy());
|
||||||
|
|
||||||
|
players.remove(p);
|
||||||
|
sbteam.removePlayer(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user