Advertisement
Guest User

Untitled

a guest
Aug 6th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  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) {
  9. while (rs.next()) {
  10. count++;
  11. sender.sendMessage(ChatColor.GOLD + rs.getString(1) + ": K/D Ratio - " + rs.getInt(4) + " Kills- " + rs.getInt(2));
  12. }
  13. }
  14. sender.sendMessage(ChatColor.BLUE + "==========================");
  15. } catch (SQLException e) {
  16. log.severe("[FWSkills] Error at leaderboards: " + e.getMessage());
  17. } finally {
  18. sql.close(rs);
  19. sql.close(s);
  20. sql.close(c);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement