Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void lbKD(CommandSender sender) {
- int count = 0;
- try {
- sender.sendMessage(ChatColor.BLUE + "====" + ChatColor.GOLD + "Leaderboards - K/D" + ChatColor.BLUE + "====");
- c = sql.getConnection();
- s = c.createStatement();
- rs = s.executeQuery("SELECT * FROM STATS ORDER BY KD DESC");
- while (count < 9 && rs.next()) {
- count++;
- sender.sendMessage(ChatColor.GOLD + rs.getString(1) + ": K/D Ratio - " + rs.getInt(4) + " Kills- " + rs.getInt(2));
- }
- sender.sendMessage(ChatColor.BLUE + "==========================");
- } catch (SQLException e) {
- log.severe("[FWSkills] Error at leaderboards: " + e.getMessage());
- } finally {
- sql.close(rs);
- sql.close(s);
- sql.close(c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement