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