Fixed /ma leave, thanks Paul!
This commit is contained in:
Binary file not shown.
@@ -293,12 +293,17 @@ public class Arena
|
|||||||
|
|
||||||
public void playerLeave(Player p)
|
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);
|
MAUtils.clearInventory(p);
|
||||||
|
|
||||||
restoreInvAndGiveRewards(p);
|
//restoreInvAndGiveRewards(p);
|
||||||
if (log != null && log.players.get(p) != null)
|
//if (log != null && log.players.get(p) != null)
|
||||||
log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
// log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
||||||
movePlayerToEntry(p);
|
movePlayerToEntry(p);
|
||||||
finishWithPlayer(p);
|
finishWithPlayer(p);
|
||||||
endArena();
|
endArena();
|
||||||
@@ -306,9 +311,11 @@ public class Arena
|
|||||||
|
|
||||||
public void playerDeath(Player p)
|
public void playerDeath(Player p)
|
||||||
{
|
{
|
||||||
MAUtils.clearInventory(p);
|
//MAUtils.clearInventory(p);
|
||||||
restoreInvAndGiveRewards(p);
|
//restoreInvAndGiveRewards(p);
|
||||||
log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
//log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
||||||
|
|
||||||
|
finishArenaPlayer(p);
|
||||||
|
|
||||||
if (specOnDeath)
|
if (specOnDeath)
|
||||||
{
|
{
|
||||||
@@ -491,6 +498,13 @@ public class Arena
|
|||||||
resetPlayer(p);
|
resetPlayer(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void finishArenaPlayer(Player p)
|
||||||
|
{
|
||||||
|
MAUtils.clearInventory(p);
|
||||||
|
restoreInvAndGiveRewards(p);
|
||||||
|
log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*////////////////////////////////////////////////////////////////////
|
/*////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user