Fix #38 and also a weird typo

This commit is contained in:
regulad 2021-06-27 23:06:28 -04:00
parent af401dddc8
commit d4fbc64897

View file

@ -47,8 +47,8 @@ public class MySQLStorageManager extends AbstractStorageManager {
public void setupStorage() {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
GeyserConnectConfig.MySQLConnectionSection connectionInfomation = MasterServer.getInstance().getGeyserConnectConfig().getCustomServers().getMysql();
connection = DriverManager.getConnection("jdbc:mysql://" + connectionInfomation.getHost() + "/" + connectionInfomation.getDatabase(), connectionInfomation.getUser(), connectionInfomation.getPass());
GeyserConnectConfig.MySQLConnectionSection connectionInformation = MasterServer.getInstance().getGeyserConnectConfig().getCustomServers().getMysql();
connection = DriverManager.getConnection("jdbc:mysql://" + connectionInformation.getHost() + ":" + connectionInformation.getPort() + "/" + connectionInformation.getDatabase(), connectionInformation.getUser(), connectionInformation.getPass());
Statement createPlayersTable = connection.createStatement();
createPlayersTable.executeUpdate("CREATE TABLE IF NOT EXISTS players (xuid VARCHAR(32), servers TEXT, PRIMARY KEY(xuid));");