Fixed DatabaseConnection not being loaded on startup
This commit is contained in:
@@ -43,6 +43,7 @@ public class DatabaseConnection {
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
connection = DriverManager.getConnection(
|
||||
"jdbc:" + Config.DRIVER + "://" + Config.IP + ":" + Config.PORT + "/" + Config.DATABASE + "?autoReconnect=true&enabledTLSProtocols=TLSv1.1",
|
||||
Config.USERNAME, Config.PASSWORD);
|
||||
@@ -64,13 +65,13 @@ public class DatabaseConnection {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return instance.connection;
|
||||
return connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the connection for this instance
|
||||
*/
|
||||
public boolean initialize() {
|
||||
public static boolean initialize() {
|
||||
instance = new DatabaseConnection();
|
||||
return connection != null;
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ public class ChatUser {
|
||||
this.partyId = partyId;
|
||||
this.toggledPartyChat = toggledChat;
|
||||
|
||||
//displayName = Queries.getNickname(uuid); // todo fix sql
|
||||
//if (displayName == null) {
|
||||
displayName = Queries.getNickname(uuid); // todo fix sql
|
||||
if (displayName == null) {
|
||||
displayName = Utility.getDisplayName(uuid);
|
||||
//}
|
||||
}
|
||||
|
||||
prefix = Utility.getPrefix(uuid, true);
|
||||
staffPrefix = Utility.getStaffPrefix(uuid);
|
||||
|
||||
Reference in New Issue
Block a user