atleast sql works now!
This commit is contained in:
parent
313d09906d
commit
3f7084eeb7
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,7 +3,6 @@
|
|||
.idea
|
||||
testserver
|
||||
run
|
||||
galaxy
|
||||
notes
|
||||
|
||||
# Compiled class file
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ public class ChatImplementation implements ChatAPI{
|
|||
Config.init();
|
||||
|
||||
luckPerms = getLuckPerms();
|
||||
//databaseConnection = getDataBase(); // todo fix sql
|
||||
//Queries.createTables(); // todo fix sql
|
||||
databaseConnection = getDataBase(); // todo fix sql
|
||||
Queries.createTables(); // todo fix sql
|
||||
|
||||
ChatUserManager.initialize(); // loads all the users from the db and adds them.
|
||||
RegexManager.initialize(); // load the filters and regexes from config
|
||||
|
|
|
|||
|
|
@ -236,14 +236,12 @@ public final class Config {
|
|||
|
||||
}
|
||||
|
||||
public static String DRIVER = "mysql";
|
||||
public static String IP = "0.0.0.0";
|
||||
public static String PORT = "3306";
|
||||
public static String DATABASE = "database";
|
||||
public static String USERNAME = "root";
|
||||
public static String PASSWORD = "root";
|
||||
private static void database() {
|
||||
DRIVER = getString("database.driver" , DRIVER);
|
||||
IP = getString("database.ip", IP);
|
||||
PORT = getString("database.port", PORT);
|
||||
DATABASE = getString("database.name", DATABASE);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.alttd.chat.database;
|
|||
|
||||
|
||||
import com.alttd.chat.config.Config;
|
||||
import com.alttd.chat.util.ALogger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
|
|
@ -44,8 +45,11 @@ public class DatabaseConnection {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ALogger.info("jdbc:mysql://" + Config.IP + ":" + Config.PORT + "/" + Config.DATABASE + "?autoReconnect=true"+
|
||||
"&useSSL=false");
|
||||
connection = DriverManager.getConnection(
|
||||
"jdbc:" + Config.DRIVER + "://" + Config.IP + ":" + Config.PORT + "/" + Config.DATABASE + "?autoReconnect=true&enabledTLSProtocols=TLSv1.1",
|
||||
"jdbc:mysql://" + Config.IP + ":" + Config.PORT + "/" + Config.DATABASE + "?autoReconnect=true"+
|
||||
"&useSSL=false",
|
||||
Config.USERNAME, Config.PASSWORD);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ public class RegexManager {
|
|||
}
|
||||
|
||||
public static void addFilter(ChatFilter filter) {
|
||||
ALogger.info("Adding " + filter.getName());
|
||||
chatFilters.add(filter);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
<configuration>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>net.kyori:adventure-text-minimessage</include>
|
||||
<include>com.alttd.chat:chat-api</include>
|
||||
<include>org.spongepowered:configurate-yaml</include>
|
||||
<include>org.spongepowered:configurate-core</include>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
<configuration>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>net.kyori:adventure-text-minimessage</include>
|
||||
<include>com.alttd.chat:chat-api</include>
|
||||
<include>org.spongepowered:configurate-yaml</include>
|
||||
<include>org.spongepowered:configurate-core</include>
|
||||
|
|
@ -83,11 +82,6 @@
|
|||
<artifactId>configurate-yaml</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-minimessage</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency><!-- Galaxy -->
|
||||
<groupId>com.alttd</groupId>
|
||||
<artifactId>galaxy-api</artifactId>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.24</version>
|
||||
<version>8.0.23</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.24</version>
|
||||
<version>8.0.23</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user