diff --git a/MobArena.jar b/MobArena.jar index 5ce9466..f1ac8f1 100644 Binary files a/MobArena.jar and b/MobArena.jar differ diff --git a/src/com/garbagemule/MobArena/Arena.java b/src/com/garbagemule/MobArena/Arena.java index 536bcdf..6bd2b66 100644 --- a/src/com/garbagemule/MobArena/Arena.java +++ b/src/com/garbagemule/MobArena/Arena.java @@ -293,12 +293,17 @@ public class Arena public void playerLeave(Player p) { - if (arenaPlayers.contains(p) || lobbyPlayers.contains(p)) + //if (arenaPlayers.contains(p) || lobbyPlayers.contains(p)) + // MAUtils.clearInventory(p); + + if (arenaPlayers.contains(p)) + finishArenaPlayer(p); + else if (lobbyPlayers.contains(p)) MAUtils.clearInventory(p); - restoreInvAndGiveRewards(p); - if (log != null && log.players.get(p) != null) - log.players.get(p).lastWave = spawnThread.getWave() - 1; + //restoreInvAndGiveRewards(p); + //if (log != null && log.players.get(p) != null) + // log.players.get(p).lastWave = spawnThread.getWave() - 1; movePlayerToEntry(p); finishWithPlayer(p); endArena(); @@ -306,9 +311,11 @@ public class Arena public void playerDeath(Player p) { - MAUtils.clearInventory(p); - restoreInvAndGiveRewards(p); - log.players.get(p).lastWave = spawnThread.getWave() - 1; + //MAUtils.clearInventory(p); + //restoreInvAndGiveRewards(p); + //log.players.get(p).lastWave = spawnThread.getWave() - 1; + + finishArenaPlayer(p); if (specOnDeath) { @@ -491,6 +498,13 @@ public class Arena resetPlayer(p); } + private void finishArenaPlayer(Player p) + { + MAUtils.clearInventory(p); + restoreInvAndGiveRewards(p); + log.players.get(p).lastWave = spawnThread.getWave() - 1; + } + /*////////////////////////////////////////////////////////////////////