Fixed silly logging bug when leaving from the lobby.
This commit is contained in:
@@ -580,7 +580,7 @@ public class ArenaImpl implements Arena
|
||||
removePotionEffects(p);
|
||||
|
||||
ArenaPlayer ap = arenaPlayerMap.get(p);
|
||||
if (ap != null) log.playerLeave(ap);
|
||||
if (ap != null && running) log.playerDeath(ap);
|
||||
|
||||
if (inLobby(p) || inArena(p)) {
|
||||
inventoryManager.clearInventory(p);
|
||||
@@ -609,7 +609,7 @@ public class ArenaImpl implements Arena
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
ArenaPlayer ap = arenaPlayerMap.get(p);
|
||||
if (ap != null) log.playerLeave(ap);
|
||||
if (ap != null) log.playerDeath(ap);
|
||||
|
||||
arenaPlayers.remove(p);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ArenaLog
|
||||
totalsBuilder.finish();
|
||||
}
|
||||
|
||||
public void playerLeave(ArenaPlayer ap) {
|
||||
public void playerDeath(ArenaPlayer ap) {
|
||||
ArenaLogPlayerEntry entry = ArenaLogPlayerEntry.create(ap);
|
||||
sessionBuilder.buildPlayerEntry(entry, arena.getRewardManager().getRewards(ap.getPlayer()));
|
||||
totalsBuilder.updatePlayerEntry(entry);
|
||||
|
||||
Reference in New Issue
Block a user