mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-02 16:59:42 +01:00
Fixed Session PlayerKills not being saved
This commit is contained in:
parent
e75f9a1027
commit
a130ce97ad
@ -199,7 +199,7 @@ public class Session extends DataContainer implements DateHolder {
|
||||
return worldTimes;
|
||||
}
|
||||
|
||||
private List<PlayerKill> getPlayerKills() {
|
||||
public List<PlayerKill> getPlayerKills() {
|
||||
return playerKills;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class KillsTable extends UserIDTable {
|
||||
UUID victim = UUID.fromString(uuidS);
|
||||
long date = set.getLong(Col.DATE.get());
|
||||
String weapon = set.getString(Col.WEAPON.get());
|
||||
session.getUnsafe(SessionKeys.PLAYER_KILLS).add(new PlayerKill(victim, weapon, date));
|
||||
session.getPlayerKills().add(new PlayerKill(victim, weapon, date));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -286,7 +286,7 @@ public class KillsTable extends UserIDTable {
|
||||
for (Session session : sessions) {
|
||||
int sessionID = session.getUnsafe(SessionKeys.DB_ID);
|
||||
// Every kill
|
||||
for (PlayerKill kill : session.getUnsafe(SessionKeys.PLAYER_KILLS)) {
|
||||
for (PlayerKill kill : session.getPlayerKills()) {
|
||||
UUID victim = kill.getVictim();
|
||||
long date = kill.getDate();
|
||||
String weapon = kill.getWeapon();
|
||||
|
@ -113,7 +113,7 @@ public class SessionsTable extends UserIDTable {
|
||||
}
|
||||
|
||||
db.getWorldTimesTable().saveWorldTimes(uuid, sessionID, session.getUnsafe(SessionKeys.WORLD_TIMES));
|
||||
db.getKillsTable().savePlayerKills(uuid, sessionID, session.getUnsafe(SessionKeys.PLAYER_KILLS));
|
||||
db.getKillsTable().savePlayerKills(uuid, sessionID, session.getPlayerKills());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user