mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-12-24 01:58:34 +01:00
Fixed /ma leave, thanks Paul!
This commit is contained in:
parent
aac0a6bb0d
commit
1b1e1704c0
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user