Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int getKills(String uuid) {
- int kills = 0;
- if(exists(uuid)){
- ResultSet rs = main.mysql.query("SELECT * FROM kbffa_stats WHERE uuid='"+uuid+"'");
- try {
- if(rs.next() || (Integer.valueOf(rs.getInt("kills"))) != null){
- kills = rs.getInt("kills");
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return kills;
- }
- public int getDeaths(String uuid) {
- int deaths = 0;
- if(exists(uuid)){
- ResultSet rs = main.mysql.query("SELECT * FROM kbffa_stats WHERE uuid='"+uuid+"'");
- try {
- if(rs.next() || (Integer.valueOf(rs.getInt("deaths"))) != null){
- deaths = rs.getInt("deaths");
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- return deaths;
- }
- public double getKD(String uuid) {
- double kd = 0;
- kd = (double)getKills(uuid)/(double)getDeaths(uuid);
- return kd;
- }
Advertisement
Add Comment
Please, Sign In to add comment