mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-07 02:47:27 +02:00
Fixed a couple errors on MySQL
This commit is contained in:
parent
95f27a0a99
commit
d2c70186ec
@ -178,7 +178,7 @@ public class KillQueries {
|
||||
AND + KillsTable.DATE + ">=?" +
|
||||
AND + KillsTable.DATE + "<=?" +
|
||||
GROUP_BY + KillsTable.VICTIM_UUID;
|
||||
String sql = SELECT + "AVG(CAST(kills AS FLOAT)/CAST(deaths AS FLOAT)) as kdr" +
|
||||
String sql = SELECT + "AVG(CAST(kills AS double)/CAST(deaths AS double)) as kdr" +
|
||||
FROM + '(' + selectKillCounts + ") q1" +
|
||||
INNER_JOIN + '(' + selectDeathCounts + ") q2 on q1." + KillsTable.KILLER_UUID + "=q2." + KillsTable.VICTIM_UUID +
|
||||
WHERE + "deaths!=0";
|
||||
@ -251,7 +251,7 @@ public class KillQueries {
|
||||
AND + KillsTable.DATE + "<=?" +
|
||||
GROUP_BY + KillsTable.WEAPON;
|
||||
String sql = SELECT + KillsTable.WEAPON +
|
||||
FROM + '(' + innerSQL + ')' +
|
||||
FROM + '(' + innerSQL + ") q1" +
|
||||
ORDER_BY + "kills DESC LIMIT ?";
|
||||
|
||||
return new QueryStatement<List<String>>(sql, limit) {
|
||||
@ -280,7 +280,7 @@ public class KillQueries {
|
||||
AND + KillsTable.DATE + "<=?" +
|
||||
GROUP_BY + KillsTable.WEAPON;
|
||||
String sql = SELECT + KillsTable.WEAPON +
|
||||
FROM + '(' + innerSQL + ')' +
|
||||
FROM + '(' + innerSQL + ") q1" +
|
||||
ORDER_BY + "kills DESC LIMIT ?";
|
||||
|
||||
return new QueryStatement<List<String>>(sql, limit) {
|
||||
|
@ -193,7 +193,7 @@ public class WorldTimesQueries {
|
||||
|
||||
@Override
|
||||
public GMTimes processResults(ResultSet set) throws SQLException {
|
||||
return extractGMTimes(set, GMTimes.getGMKeyArray());
|
||||
return set.next() ? extractGMTimes(set, GMTimes.getGMKeyArray()) : new GMTimes();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class PvPPvEJSONParser implements TabJSONParser<Map<String, Object>> {
|
||||
|
||||
Map<String, Object> insights = new HashMap<>();
|
||||
|
||||
List<String> top3Weapons = db.query(KillQueries.topWeaponsOfPlayer(monthAgo, now, serverUUID, 3));
|
||||
List<String> top3Weapons = db.query(KillQueries.topWeaponsOfServer(monthAgo, now, serverUUID, 3));
|
||||
insights.put("weapon_1st", getWeapon(top3Weapons, 0).orElse("-"));
|
||||
insights.put("weapon_2nd", getWeapon(top3Weapons, 1).orElse("-"));
|
||||
insights.put("weapon_3rd", getWeapon(top3Weapons, 2).orElse("-"));
|
||||
|
@ -117,6 +117,12 @@ Display_options:
|
||||
Show_player_IPs: true
|
||||
Graphs:
|
||||
Show_gaps_in_data: false
|
||||
TPS:
|
||||
High_threshold: 18
|
||||
Medium_threshold: 10
|
||||
Disk_space:
|
||||
High_threshold: 500
|
||||
Medium_threshold: 100
|
||||
Command_colors:
|
||||
Main: '&2'
|
||||
Secondary: '&7'
|
||||
|
@ -79,7 +79,7 @@
|
||||
'.card,.bg-white,.modal-content,.page-loader,.nav-tabs .nav-link:hover,.nav-tabs,hr {background-color:#44475a;border-color:#6272a4!important;}' +
|
||||
'.bg-white.collapse-inner {border:1px solid;}' +
|
||||
'.card-header {background-color:#44475a;border-color:#6272a4;}' +
|
||||
'#content,.col-black,.text-gray-800,.collapse-item,.modal-title,.modal-body,.page-loader,.close,.fc-title,.fc-time {color:#eee8d5 !important;}' +
|
||||
'#content,.col-black,.text-gray-800,.collapse-item,.modal-title,.modal-body,.page-loader,.close,.fc-title,.fc-time,pre {color:#eee8d5 !important;}' +
|
||||
'.collapse-item:hover,.nav-link.active {background-color: #606270 !important;}' +
|
||||
'.nav-tabs .nav-link.active {background-color: #44475a !important;border-color:#6272a4 #6272a4 #44475a !important;}' +
|
||||
'.fc-today {background:#646e8c !important}' +
|
||||
|
@ -114,11 +114,6 @@ public class ConfigSettingKeyTest {
|
||||
settings.remove(PluginSettings.SERVER_NAME);
|
||||
settings.remove(PluginSettings.BUNGEE_COPY_CONFIG);
|
||||
settings.remove(DatabaseSettings.TYPE);
|
||||
settings.remove(DisplaySettings.GRAPH_TPS_THRESHOLD_MED);
|
||||
settings.remove(DisplaySettings.GRAPH_TPS_THRESHOLD_HIGH);
|
||||
settings.remove(DisplaySettings.GRAPH_DISK_THRESHOLD_MED);
|
||||
settings.remove(DisplaySettings.GRAPH_DISK_THRESHOLD_HIGH);
|
||||
settings.remove(DisplaySettings.GRAPH_DISK_THRESHOLD_HIGH);
|
||||
settings.remove(DisplaySettings.WORLD_ALIASES);
|
||||
settings.remove(TimeSettings.ANALYSIS_REFRESH_PERIOD);
|
||||
return settings;
|
||||
|
Loading…
Reference in New Issue
Block a user