First ranked implementation #95
@ -29,7 +29,10 @@ public class RankCommand extends BasicCommand {
|
||||
int elo = Elo.getElo(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);
|
||||
try{
|
||||
if(!rs.next())
|
||||
throw new SecurityException("Could not get place");
|
||||
return -1;
|
||||
|
||||
return rs.getInt("Place");
|
||||
}catch(SQLException e){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren