Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void openConnection() throws SQLException, ClassNotFoundException {
- if (c != null && !c.isClosed()) {
- return;
- }
- synchronized (this) {
- if (c != null && !c.isClosed()) {
- return;
- }
- Class.forName("com.mysql.jdbc.Driver");
- c = DriverManager.getConnection("jdbc:mysql://" + MSPMain.host+ ":" + MSPMain.port + "/" + MSPMain.database, MSPMain.username, MSPMain.password);
- }
- }
- try {
- openConnection();
- }
- catch (SQLException e) {
- console.sendMessage(prefix+"Error creating default table `players`:");
- console.sendMessage(e.getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement