Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. @SuppressWarnings("finally")
  2. public static Integer getCoins(Player p){
  3. Integer temp = 0;
  4. String query = "SELECT * FROM nombre WHERE `uuid` = '" + p.getUniqueId() + "'";
  5. try {
  6. ResultSet res = connection.prepareStatement(query).executeQuery();
  7. while (res.next()) {
  8. temp = res.getInt("coins");
  9. }
  10. res.close();
  11. } catch (SQLException e) {
  12. e.printStackTrace();
  13. } finally {
  14. return temp;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement