mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 22:11:52 +01:00
Added missing PING to PlayerContainer when a single player was fetched.
This commit is contained in:
parent
60592c62e9
commit
62221b1582
@ -278,6 +278,7 @@ public class SQLFetchOps extends SQLOps implements FetchOperations {
|
|||||||
|
|
||||||
container.putAll(usersTable.getUserInformation(uuid));
|
container.putAll(usersTable.getUserInformation(uuid));
|
||||||
container.putSupplier(PlayerKeys.GEO_INFO, () -> geoInfoTable.getGeoInfo(uuid));
|
container.putSupplier(PlayerKeys.GEO_INFO, () -> geoInfoTable.getGeoInfo(uuid));
|
||||||
|
container.putSupplier(PlayerKeys.PING, () -> pingTable.getPing(uuid));
|
||||||
container.putSupplier(PlayerKeys.NICKNAMES, () -> nicknamesTable.getNicknameInformation(uuid));
|
container.putSupplier(PlayerKeys.NICKNAMES, () -> nicknamesTable.getNicknameInformation(uuid));
|
||||||
container.putSupplier(PlayerKeys.PER_SERVER, () -> getPerServerData(uuid));
|
container.putSupplier(PlayerKeys.PER_SERVER, () -> getPerServerData(uuid));
|
||||||
|
|
||||||
|
@ -589,6 +589,7 @@ public class SQLiteTest {
|
|||||||
assertTrue(db.getWorldTable().getAllWorlds().isEmpty());
|
assertTrue(db.getWorldTable().getAllWorlds().isEmpty());
|
||||||
assertTrue(tpsTable.getTPSData().isEmpty());
|
assertTrue(tpsTable.getTPSData().isEmpty());
|
||||||
assertTrue(db.getServerTable().getBukkitServers().isEmpty());
|
assertTrue(db.getServerTable().getBukkitServers().isEmpty());
|
||||||
|
assertTrue(db.getPingTable().getAllPings().isEmpty());
|
||||||
assertTrue(securityTable.getUsers().isEmpty());
|
assertTrue(securityTable.getUsers().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -601,6 +602,7 @@ public class SQLiteTest {
|
|||||||
GeoInfoTable geoInfoTable = database.getGeoInfoTable();
|
GeoInfoTable geoInfoTable = database.getGeoInfoTable();
|
||||||
TPSTable tpsTable = database.getTpsTable();
|
TPSTable tpsTable = database.getTpsTable();
|
||||||
SecurityTable securityTable = database.getSecurityTable();
|
SecurityTable securityTable = database.getSecurityTable();
|
||||||
|
PingTable pingTable = database.getPingTable();
|
||||||
|
|
||||||
saveUserOne(database);
|
saveUserOne(database);
|
||||||
saveUserTwo(database);
|
saveUserTwo(database);
|
||||||
@ -644,6 +646,11 @@ public class SQLiteTest {
|
|||||||
tpsTable.insertTPS(tps);
|
tpsTable.insertTPS(tps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pingTable.insertPing(playerUUID, new Ping(
|
||||||
|
System.currentTimeMillis(), TestConstants.SERVER_UUID,
|
||||||
|
r.nextInt(), r.nextInt(), r.nextDouble()
|
||||||
|
));
|
||||||
|
|
||||||
securityTable.addNewUser(new WebUser("Test", "RandomGarbageBlah", 0));
|
securityTable.addNewUser(new WebUser("Test", "RandomGarbageBlah", 0));
|
||||||
System.out.println("Done!\n");
|
System.out.println("Done!\n");
|
||||||
}
|
}
|
||||||
@ -747,7 +754,9 @@ public class SQLiteTest {
|
|||||||
|
|
||||||
saveAllData(db);
|
saveAllData(db);
|
||||||
|
|
||||||
|
System.out.println("Running backup..");
|
||||||
db.backup().backup(backup);
|
db.backup().backup(backup);
|
||||||
|
System.out.println("Backup Complete!");
|
||||||
|
|
||||||
UserInfoTable userInfoTable = backup.getUserInfoTable();
|
UserInfoTable userInfoTable = backup.getUserInfoTable();
|
||||||
UsersTable usersTable = backup.getUsersTable();
|
UsersTable usersTable = backup.getUsersTable();
|
||||||
|
Loading…
Reference in New Issue
Block a user