Server Join/leave Messages
This commit is contained in:
@@ -204,4 +204,31 @@ public final class Config {
|
||||
REGEXNODE = getNode("regex-settings");
|
||||
}
|
||||
|
||||
public static String SERVERSWTICHMESSAGEFROM = "&7* {player} comes from {from_server}..."; // TODO CONVERT THESE TO MINIMESSAGE
|
||||
public static String SERVERSWTICHMESSAGETO = "&7* {player} leaves to {to_server}...";
|
||||
public static String SERVERJOINMESSAGE = "&a* {player} appears from thin air...";
|
||||
public static String SERVERLEAVEMESSAGE = "&c* {player} vanishes in the mist...";
|
||||
private static void JoinLeaveMessages() {
|
||||
SERVERSWTICHMESSAGEFROM = getString("messages.switch-server-from", SERVERSWTICHMESSAGEFROM);
|
||||
SERVERSWTICHMESSAGETO = getString("messages.switch-server-to", SERVERSWTICHMESSAGETO);
|
||||
SERVERJOINMESSAGE = getString("messages.join-server", SERVERJOINMESSAGE);
|
||||
SERVERLEAVEMESSAGE = getString("messages.leave-server", SERVERLEAVEMESSAGE);
|
||||
|
||||
}
|
||||
|
||||
public static String DRIVER = "databasedriver";
|
||||
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);
|
||||
USERNAME = getString("database.username", USERNAME);
|
||||
PASSWORD = getString("database.password", PASSWORD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.alttd.chat.database;
|
||||
|
||||
|
||||
import com.alttd.chat.config.Config;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
@@ -16,14 +18,12 @@ public class DatabaseConnection {
|
||||
*/
|
||||
public DatabaseConnection() {
|
||||
|
||||
/*this.drivers = Config.drivers;
|
||||
this.ip = Config.ip;
|
||||
this.port = Config.port;
|
||||
this.database = Config.database;
|
||||
this.username = Config.username;
|
||||
this.password = Config.password;*/
|
||||
// temp to make compile, remove when config is added
|
||||
this.drivers = this.ip = this.port = this.database = this.username = this.password = "";
|
||||
this.drivers = Config.DRIVER;
|
||||
this.ip = Config.IP;
|
||||
this.port = Config.PORT;
|
||||
this.database = Config.DATABASE;
|
||||
this.username = Config.USERNAME;
|
||||
this.password = Config.PASSWORD;
|
||||
instance = this;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user