Advertisement
riking

Untitled

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