Skip to content

Commit

Permalink
Update DatabaseManager.java (#24)
Browse files Browse the repository at this point in the history
Create variables after checking.
  • Loading branch information
Tomut0 authored Feb 5, 2021
1 parent ae3a5a1 commit 00f0f74
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ public void setup() {

private void start() throws SQLException {
ConfigManager cm = plugin.getConfigManager();
String hostname = cm.getSqlHostname();
int port = cm.getSqlPort();
String database = cm.getSqlDatabase();
String username = cm.getSqlUsername();
String password = cm.getSqlPassword();
if (cm.isSqlUseMysql()) {
String hostname = cm.getSqlHostname();
int port = cm.getSqlPort();
String database = cm.getSqlDatabase();
String username = cm.getSqlUsername();
String password = cm.getSqlPassword();
try {
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql://" + hostname + ":" + port + "/" + database +
Expand Down

0 comments on commit 00f0f74

Please sign in to comment.