Fix unplaced
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
361e91997d
Commit
758e10baff
@ -29,7 +29,10 @@ public class RankCommand extends BasicCommand {
|
|||||||
int elo = Elo.getElo(user.getId(), mode.getSchemType());
|
int elo = Elo.getElo(user.getId(), mode.getSchemType());
|
||||||
int placement = Elo.getPlacement(user.getId(), mode.getSchemType());
|
int placement = Elo.getPlacement(user.getId(), mode.getSchemType());
|
||||||
|
|
||||||
BungeeCore.send(player, "§e" + placement + "§8. §7mit §e" + elo + " §7Elo§8.");
|
if(placement == -1)
|
||||||
|
BungeeCore.send(player, "§7" + mode.getChatName() + "§8: §eunplatziert");
|
||||||
|
else
|
||||||
|
BungeeCore.send(player, "§7" + mode.getChatName() + "§8: §e" + placement + "§8. §7mit §e" + elo + " §7Elo§8.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ public class Elo {
|
|||||||
ResultSet rs = SQL.select("SELECT COUNT(*) AS Place FROM Elo WHERE GameMode = ? AND Elo > ?", gameMode, elo);
|
ResultSet rs = SQL.select("SELECT COUNT(*) AS Place FROM Elo WHERE GameMode = ? AND Elo > ?", gameMode, elo);
|
||||||
try{
|
try{
|
||||||
if(!rs.next())
|
if(!rs.next())
|
||||||
throw new SecurityException("Could not get place");
|
return -1;
|
||||||
|
|
||||||
return rs.getInt("Place");
|
return rs.getInt("Place");
|
||||||
}catch(SQLException e){
|
}catch(SQLException e){
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren