Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("finally")
- public static Integer getCoins(Player p){
- Integer temp = 0;
- String query = "SELECT * FROM nombre WHERE `uuid` = '" + p.getUniqueId() + "'";
- try {
- ResultSet res = connection.prepareStatement(query).executeQuery();
- while (res.next()) {
- temp = res.getInt("coins");
- }
- res.close();
- } catch (SQLException e) {
- e.printStackTrace();
- } finally {
- return temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement