Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public boolean isPlayerInDataBase(Player p) {
  2.  
  3. try (Connection connection = sql.getConnection();
  4.  
  5. PreparedStatement select = connection.prepareStatement(
  6. "SELECT * FROM `MurderData` WHERE uuid='" + p.getUniqueId().toString() + "'")) {
  7.  
  8. ResultSet result = select.executeQuery();
  9. if (result.next()) {
  10. CloseResultSet(result);
  11. return true;
  12. }
  13. } catch (SQLException e) {
  14. e.printStackTrace();
  15. }
  16. return false;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement