Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- synchronized (this) {
- if (getConnection() != null && !getConnection().isClosed()) {
- return;
- } else {
- Bukkit.getConsoleSender().sendMessage(cc("&4(!) &bEasyRegister now &cNot Connected &bto a database&f"));
- }
- Class.forName("com.mysql.jdbc.Driver");
- setConnection(DriverManager.getConnection("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database, this.username, this.password));
- Bukkit.getConsoleSender().sendMessage(cc("&4(!) &bEasyRegister now &aConnected &bto a database&f"));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement