From 5a4f89b484f29a1e0965fef360ea2eafa01aa38d Mon Sep 17 00:00:00 2001 From: TadahTech Date: Thu, 28 Apr 2016 21:04:07 -0500 Subject: [PATCH] Fix ELO query --- Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java index 72d7a9420..dfa5e57d6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java @@ -28,7 +28,7 @@ public class EloRepository extends MinecraftRepository private static String GRAB_BAN_EXPIRY = "SELECT banEnd FROM rankedBans WHERE accountId = ?;"; private static String UPDATE_BAN = "INSERT INTO rankedBans (accountId, strikes, strikesExpire, banEnd) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE strikes=VALUES(strikes), strikesExpire=VALUES(strikesExpire), banEnd=VALUES(banEnd);"; private static String DELETE_STRIKES = "UPDATE rankedBans SET strikes = 1 WHERE accountId = ?;"; - private static String GET_ELO = "SELECT `elo, accountId` FROM eloRating WHERE gameType=? ORDER BY ASC LIMIT $limit;"; + private static String GET_ELO = "SELECT `elo`,`accountId` FROM `eloRating` ORDER BY `elo` DESC LIMIT $limit;"; private static String GET_NAME_FROM_ID = "SELECT `name` FROM `accounts` WHERE `id`=?;"; public EloRepository(JavaPlugin plugin)