Fixed Session PlayerKills not being saved

This commit is contained in:
Rsl1122 2018-08-23 19:07:46 +03:00
parent e75f9a1027
commit a130ce97ad
3 changed files with 4 additions and 4 deletions

View File

@ -199,7 +199,7 @@ public class Session extends DataContainer implements DateHolder {
return worldTimes;
}
private List<PlayerKill> getPlayerKills() {
public List<PlayerKill> getPlayerKills() {
return playerKills;
}

View File

@ -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();

View File

@ -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());
}
/**