Fix & Move *.html files to pluginFolder/email-formats

This commit is contained in:
MC~蛟龙 2024-07-11 21:21:07 +08:00
parent 18b80db43f
commit 20df00e9e6
13 changed files with 90 additions and 67 deletions

View File

@ -37,7 +37,7 @@ subprojects {
// Java Libraries // Java Libraries
compileOnly("org.geysermc.floodgate:api:2.2.2-SNAPSHOT") compileOnly("org.geysermc.floodgate:api:2.2.2-SNAPSHOT")
// Jalu Injector // Jalu Injector
implementation("ch.jalu:injector:1.0") implementation(rootProject.libs.jalu.injector)
// MaxMind GEO IP with our modifications to use GSON in replacement of the big Jackson dependency // MaxMind GEO IP with our modifications to use GSON in replacement of the big Jackson dependency
// GSON is already included and therefore it reduces the file size in comparison to the original version // GSON is already included and therefore it reduces the file size in comparison to the original version
implementation("com.maxmind.db:maxmind-db-gson:2.0.3") { implementation("com.maxmind.db:maxmind-db-gson:2.0.3") {
@ -49,7 +49,7 @@ subprojects {
compileOnly("org.apache.logging.log4j:log4j-core:2.20.0") // Log4J version bundled in 1.12.2 compileOnly("org.apache.logging.log4j:log4j-core:2.20.0") // Log4J version bundled in 1.12.2
// Libby // Libby
implementation("com.alessiodp.libby:libby-bukkit:2.0.0-SNAPSHOT") implementation("com.alessiodp.libby:libby-bukkit:2.0.0-SNAPSHOT")
// Database Connection Pool // Database Connection Pool TODO Remove
implementation("com.zaxxer:HikariCP:4.0.3" /* Latest java 8 release */) { implementation("com.zaxxer:HikariCP:4.0.3" /* Latest java 8 release */) {
exclude("org.slf4j", "slf4j-api") exclude("org.slf4j", "slf4j-api")
} }
@ -86,7 +86,7 @@ subprojects {
compileOnly("net.essentialsx:EssentialsX:2.20.1") compileOnly("net.essentialsx:EssentialsX:2.20.1")
// XAuth, another authentication plugin, required by the database converter // XAuth, another authentication plugin, required by the database converter
compileOnly("de.luricos.bukkit:xAuth:2.6.1-SNAPSHOT") compileOnly("de.luricos.bukkit:xAuth:2.6.1-SNAPSHOT")
implementation("ch.jalu:datasourcecolumns:0.1.1-SNAPSHOT") implementation("ch.jalu:datasourcecolumns:0.1.1-SNAPSHOT") // TODO REMOVE
implementation("org.postgresql:postgresql:42.7.3") { implementation("org.postgresql:postgresql:42.7.3") {
exclude("org.checkerframework", "checker-qual") exclude("org.checkerframework", "checker-qual")
} }
@ -128,7 +128,6 @@ subprojects {
relocate("org.apache.commons", "${project.group}.libs.org.apache.commons") relocate("org.apache.commons", "${project.group}.libs.org.apache.commons")
relocate("com.github.benmanes.caffeine", "${project.group}.libs.com.github.benmanes.caffeine") relocate("com.github.benmanes.caffeine", "${project.group}.libs.com.github.benmanes.caffeine")
relocate("ch.jalu", "${project.group}.libs.ch.jalu") relocate("ch.jalu", "${project.group}.libs.ch.jalu")
relocate("com.zaxxer.hikari", "${project.group}.libs.com.zaxxer.hikari")
relocate("org.slf4j", "${project.group}.libs.org.slf4j") relocate("org.slf4j", "${project.group}.libs.org.slf4j")
relocate("com.maxmind.db", "${project.group}.libs.com.maxmind.db") relocate("com.maxmind.db", "${project.group}.libs.com.maxmind.db")
relocate("com.ice.tar", "${project.group}.libs.com.icetar.tar") relocate("com.ice.tar", "${project.group}.libs.com.icetar.tar")
@ -143,7 +142,10 @@ subprojects {
// bStats metrics class // bStats metrics class
relocate("org.bstats", "${project.group}.libs.org.bstats") relocate("org.bstats", "${project.group}.libs.org.bstats")
relocate("org.mariadb.jdbc", "${project.group}.libs.org.mariadb.jdbc") relocate("org.mariadb.jdbc", "${project.group}.libs.org.mariadb.jdbc")
relocate("com.github.Anon8281.universalScheduler", "${project.group}.libs.com.github.Anon8281.universalScheduler") relocate(
"com.github.Anon8281.universalScheduler",
"${project.group}.libs.com.github.Anon8281.universalScheduler"
)
relocate("com.mysql", "${project.group}.libs.com.mysql") relocate("com.mysql", "${project.group}.libs.com.mysql")
relocate("com.google.protobuf", "${project.group}.libs.com.google.protobuf") relocate("com.google.protobuf", "${project.group}.libs.com.google.protobuf")
relocate("io.netty", "${project.group}.libs.io.netty") relocate("io.netty", "${project.group}.libs.io.netty")

View File

@ -9,7 +9,6 @@ import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.settings.properties.CommonSettings; import fr.xephi.authme.settings.properties.CommonSettings;
import fr.xephi.authme.settings.properties.EmailSettings; import fr.xephi.authme.settings.properties.EmailSettings;
import fr.xephi.authme.settings.properties.HooksSettings; import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.PluginSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings; import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.settings.properties.SecuritySettings; import fr.xephi.authme.settings.properties.SecuritySettings;
@ -50,37 +49,37 @@ public class SettingsWarner {
// Use TLS property only affects port 25 // Use TLS property only affects port 25
if (!settings.getProperty(EmailSettings.PORT25_USE_TLS) if (!settings.getProperty(EmailSettings.PORT25_USE_TLS)
&& settings.getProperty(EmailSettings.SMTP_PORT) != 25) { && settings.getProperty(EmailSettings.SMTP_PORT) != 25) {
logger.warning("Note: You have set Email.useTls to false but this only affects mail over port 25"); logger.warning("Note: You have set Email.useTls to false but this only affects mail over port 25");
} }
// Output hint if sessions are enabled that the timeout must be positive // Output hint if sessions are enabled that the timeout must be positive
if (settings.getProperty(CommonSettings.SESSIONS_ENABLED) if (settings.getProperty(CommonSettings.SESSIONS_ENABLED)
&& settings.getProperty(CommonSettings.SESSIONS_TIMEOUT) <= 0) { && settings.getProperty(CommonSettings.SESSIONS_TIMEOUT) <= 0) {
logger.warning("Warning: Session timeout needs to be positive in order to work!"); logger.warning("Warning: Session timeout needs to be positive in order to work!");
} }
// Warn if spigot.yml has settings.bungeecord set to true but config.yml has Hooks.bungeecord set to false // Warn if spigot.yml has settings.bungeecord set to true but config.yml has Hooks.bungeecord set to false
if (isTrue(bukkitService.isBungeeCordConfiguredForSpigot()) if (isTrue(bukkitService.isBungeeCordConfiguredForSpigot())
&& !settings.getProperty(HooksSettings.BUNGEECORD) && !settings.getProperty(HooksSettings.VELOCITY)) { && !settings.getProperty(HooksSettings.BUNGEECORD) && !settings.getProperty(HooksSettings.VELOCITY)) {
logger.warning("Note: Hooks.bungeecord is set to false but your server appears to be running in" logger.warning("Note: Hooks.bungeecord is set to false but your server appears to be running in"
+ " bungeecord mode (see your spigot.yml). In order to allow the datasource caching and the" + " bungeecord mode (see your spigot.yml). In order to allow the datasource caching and the"
+ " AuthMeBungee add-on to work properly you have to enable this option!"); + " AuthMeBungee add-on to work properly you have to enable this option!");
} }
if (!isTrue(bukkitService.isBungeeCordConfiguredForSpigot()) if (!isTrue(bukkitService.isBungeeCordConfiguredForSpigot())
&& settings.getProperty(HooksSettings.BUNGEECORD)) { && settings.getProperty(HooksSettings.BUNGEECORD)) {
logger.warning("Note: Hooks.bungeecord is set to true but your server appears to be running in" logger.warning("Note: Hooks.bungeecord is set to true but your server appears to be running in"
+ " non-bungeecord mode (see your spigot.yml). In order to prevent untrusted payload attack, " + " non-bungeecord mode (see your spigot.yml). In order to prevent untrusted payload attack, "
+ "BungeeCord hook will be automatically disabled!"); + "BungeeCord hook will be automatically disabled!");
} }
// Check if argon2 library is present and can be loaded // Check if argon2 library is present and can be loaded
if (settings.getProperty(SecuritySettings.PASSWORD_HASH).equals(HashAlgorithm.ARGON2) if (settings.getProperty(SecuritySettings.PASSWORD_HASH).equals(HashAlgorithm.ARGON2)
&& !Argon2.isLibraryLoaded()) { && !Argon2.isLibraryLoaded()) {
logger.warning("WARNING!!! You use Argon2 Hash Algorithm method but we can't find the Argon2 " logger.warning("WARNING!!! You use Argon2 Hash Algorithm method but we can't find the Argon2 "
+ "library on your system! See https://github.com/AuthMe/AuthMeReloaded/wiki/Argon2-as-Password-Hash"); + "library on your system! See https://github.com/AuthMe/AuthMeReloaded/wiki/Argon2-as-Password-Hash");
authMe.stopOrUnload(); authMe.stopOrUnload();
} }
} }

View File

@ -78,11 +78,12 @@ public class Settings extends SettingsManagerImpl {
} }
private void loadSettingsFromFiles() { private void loadSettingsFromFiles() {
newPasswordEmailMessage = readFile("new_email.html"); File emailFolder = new File(pluginFolder, "email-formats");
passwordEmailMessage = readFile("email.html"); newPasswordEmailMessage = readFile(emailFolder, "new_email.html");
verificationEmailMessage = readFile("verification_code_email.html"); passwordEmailMessage = readFile(emailFolder, "email.html");
recoveryCodeEmailMessage = readFile("recovery_code_email.html"); verificationEmailMessage = readFile(emailFolder, "verification_code_email.html");
shutdownEmailMessage = readFile("shutdown.html"); recoveryCodeEmailMessage = readFile(emailFolder, "recovery_code_email.html");
shutdownEmailMessage = readFile(emailFolder, "shutdown_email.html");
String country = readFile("GeoLite2-Country.mmdb"); String country = readFile("GeoLite2-Country.mmdb");
} }
@ -98,8 +99,8 @@ public class Settings extends SettingsManagerImpl {
* @param filename the file to read * @param filename the file to read
* @return the file's contents * @return the file's contents
*/ */
private String readFile(String filename) { private String readFile(File folder, String filename) {
final File file = new File(pluginFolder, filename); final File file = new File(folder, filename);
if (FileUtils.copyFileFromResource(file, filename)) { if (FileUtils.copyFileFromResource(file, filename)) {
try { try {
return Files.asCharSource(file, StandardCharsets.UTF_8).read(); return Files.asCharSource(file, StandardCharsets.UTF_8).read();
@ -112,4 +113,8 @@ public class Settings extends SettingsManagerImpl {
return ""; return "";
} }
private String readFile(String filename) {
return readFile(pluginFolder, filename);
}
} }

View File

@ -1,10 +1,19 @@
dependencies { dependencies {
compileOnly(project(":project:module-common")) // TODO 纯S这Authme原来的数据库
compileOnly(project(":project:module-util")) compileOnly(project(":project:module-util"))
compileOnly(project(":project:module-common"))
compileOnly(project(":project:module-logger")) compileOnly(project(":project:module-logger"))
compileOnly(project(":project:module-configuration"))
compileOnly(project(":project:module-message"))
compileOnly(libs.guava) compileOnly(libs.guava)
compileOnly(libs.configme) compileOnly(libs.configme)
compileOnly(libs.jalu.injector) compileOnly(libs.jalu.injector)
// Database Connection Pool
implementation("com.zaxxer:HikariCP:4.0.3" /* Latest java 8 release */) {
exclude("org.slf4j", "slf4j-api")
}
implementation("ch.jalu:datasourcecolumns:0.1.1-SNAPSHOT")
}
tasks.shadowJar {
relocate("com.zaxxer.hikari", "${project.group}.libs.com.zaxxer.hikari")
relocate("ch.jalu", "${project.group}.libs.ch.jalu")
} }

View File

@ -4,6 +4,7 @@ package fr.xephi.authme.datasource;
* DataSource type. * DataSource type.
*/ */
public enum DataSourceType { public enum DataSourceType {
H2, H2,
MYSQL, MYSQL,

View File

@ -5,29 +5,31 @@ import ch.jalu.configme.SettingsHolder;
import ch.jalu.configme.properties.Property; import ch.jalu.configme.properties.Property;
import fr.xephi.authme.datasource.DataSourceType; import fr.xephi.authme.datasource.DataSourceType;
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
public final class DatabaseSettings implements SettingsHolder { public final class DatabaseSettings implements SettingsHolder {
@Comment({"What type of database do you want to use?", @Comment({"What type of database do you want to use?",
"Valid values: H2, SQLITE, MARIADB, MYSQL, POSTGRESQL"}) "Valid values: H2, SQLITE, MARIADB, MYSQL, POSTGRESQL"})
public static final Property<DataSourceType> BACKEND = public static final Property<DataSourceType> BACKEND =
PropertyInitializer.newProperty(DataSourceType.class, "DataSource.backend", DataSourceType.SQLITE); newProperty(DataSourceType.class, "DataSource.backend", DataSourceType.SQLITE);
@Comment({"Enable the database caching system, should be disabled on bungeecord environments", @Comment({"Enable the database caching system, should be disabled on bungeecord environments",
"or when a website integration is being used."}) "or when a website integration is being used."})
public static final Property<Boolean> USE_CACHING = public static final Property<Boolean> USE_CACHING =
PropertyInitializer.newProperty("DataSource.caching", true); newProperty("DataSource.caching", true);
@Comment("Should we try to use VirtualThreads(Java 21+) for database cache loader?") @Comment("Should we try to use VirtualThreads(Java 21+) for database cache loader?")
public static final Property<Boolean> USE_VIRTUAL_THREADS = public static final Property<Boolean> USE_VIRTUAL_THREADS =
PropertyInitializer.newProperty("DataSource.useVirtualThreadsCache", false); newProperty("DataSource.useVirtualThreadsCache", false);
@Comment("Database host address") @Comment("Database host address")
public static final Property<String> MYSQL_HOST = public static final Property<String> MYSQL_HOST =
PropertyInitializer.newProperty("DataSource.mySQLHost", "127.0.0.1"); newProperty("DataSource.mySQLHost", "127.0.0.1");
@Comment("Database port") @Comment("Database port")
public static final Property<String> MYSQL_PORT = public static final Property<String> MYSQL_PORT =
PropertyInitializer.newProperty("DataSource.mySQLPort", "3306"); newProperty("DataSource.mySQLPort", "3306");
@Comment({"Replacement of Mysql's useSsl (for MariaDB only).", @Comment({"Replacement of Mysql's useSsl (for MariaDB only).",
"- disable: No SSL", "- disable: No SSL",
@ -36,133 +38,133 @@ public final class DatabaseSettings implements SettingsHolder {
"- verify_full: Encryption, certificate validation and hostname validation", "- verify_full: Encryption, certificate validation and hostname validation",
"Read more: https://bit.ly/mariadb-sslmode"}) "Read more: https://bit.ly/mariadb-sslmode"})
public static final Property<String> MARIADB_SSL_MODE = public static final Property<String> MARIADB_SSL_MODE =
PropertyInitializer.newProperty("DataSource.MariaDbSslMode", "disabled"); newProperty("DataSource.MariaDbSslMode", "disabled");
@Comment({"Connect to MySQL database over SSL", @Comment({"Connect to MySQL database over SSL",
"If you're using MariaDB, use sslMode instead"}) "If you're using MariaDB, use sslMode instead"})
public static final Property<Boolean> MYSQL_USE_SSL = public static final Property<Boolean> MYSQL_USE_SSL =
PropertyInitializer.newProperty("DataSource.mySQLUseSSL", true); newProperty("DataSource.mySQLUseSSL", true);
@Comment({"Verification of server's certificate.", @Comment({"Verification of server's certificate.",
"We would not recommend to set this option to false.", "We would not recommend to set this option to false.",
"Set this option to false at your own risk if and only if you know what you're doing"}) "Set this option to false at your own risk if and only if you know what you're doing"})
public static final Property<Boolean> MYSQL_CHECK_SERVER_CERTIFICATE = public static final Property<Boolean> MYSQL_CHECK_SERVER_CERTIFICATE =
PropertyInitializer.newProperty("DataSource.mySQLCheckServerCertificate", true); newProperty("DataSource.mySQLCheckServerCertificate", true);
@Comment({"Authorize client to retrieve RSA server public key.", @Comment({"Authorize client to retrieve RSA server public key.",
"Advanced option, ignore if you don't know what it means.", "Advanced option, ignore if you don't know what it means.",
"If you are using MariaDB, use MariaDbSslMode instead."}) "If you are using MariaDB, use MariaDbSslMode instead."})
public static final Property<Boolean> MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL = public static final Property<Boolean> MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL =
PropertyInitializer.newProperty("DataSource.mySQLAllowPublicKeyRetrieval", true); newProperty("DataSource.mySQLAllowPublicKeyRetrieval", true);
@Comment("Username to connect to the MySQL database") @Comment("Username to connect to the MySQL database")
public static final Property<String> MYSQL_USERNAME = public static final Property<String> MYSQL_USERNAME =
PropertyInitializer.newProperty("DataSource.mySQLUsername", "authme"); newProperty("DataSource.mySQLUsername", "authme");
@Comment("Password to connect to the MySQL database") @Comment("Password to connect to the MySQL database")
public static final Property<String> MYSQL_PASSWORD = public static final Property<String> MYSQL_PASSWORD =
PropertyInitializer.newProperty("DataSource.mySQLPassword", "12345"); newProperty("DataSource.mySQLPassword", "12345");
@Comment("Database Name, use with converters or as SQLITE database name") @Comment("Database Name, use with converters or as SQLITE database name")
public static final Property<String> MYSQL_DATABASE = public static final Property<String> MYSQL_DATABASE =
PropertyInitializer.newProperty("DataSource.mySQLDatabase", "authme"); newProperty("DataSource.mySQLDatabase", "authme");
@Comment("Table of the database") @Comment("Table of the database")
public static final Property<String> MYSQL_TABLE = public static final Property<String> MYSQL_TABLE =
PropertyInitializer.newProperty("DataSource.mySQLTablename", "authme"); newProperty("DataSource.mySQLTablename", "authme");
@Comment("Column of IDs to sort data") @Comment("Column of IDs to sort data")
public static final Property<String> MYSQL_COL_ID = public static final Property<String> MYSQL_COL_ID =
PropertyInitializer.newProperty("DataSource.mySQLColumnId", "id"); newProperty("DataSource.mySQLColumnId", "id");
@Comment("Column for storing or checking players nickname") @Comment("Column for storing or checking players nickname")
public static final Property<String> MYSQL_COL_NAME = public static final Property<String> MYSQL_COL_NAME =
PropertyInitializer.newProperty("DataSource.mySQLColumnName", "username"); newProperty("DataSource.mySQLColumnName", "username");
@Comment("Column for storing or checking players RealName") @Comment("Column for storing or checking players RealName")
public static final Property<String> MYSQL_COL_REALNAME = public static final Property<String> MYSQL_COL_REALNAME =
PropertyInitializer.newProperty("DataSource.mySQLRealName", "realname"); newProperty("DataSource.mySQLRealName", "realname");
@Comment("Column for storing players passwords") @Comment("Column for storing players passwords")
public static final Property<String> MYSQL_COL_PASSWORD = public static final Property<String> MYSQL_COL_PASSWORD =
PropertyInitializer.newProperty("DataSource.mySQLColumnPassword", "password"); newProperty("DataSource.mySQLColumnPassword", "password");
@Comment("Column for storing players passwords salts") @Comment("Column for storing players passwords salts")
public static final Property<String> MYSQL_COL_SALT = public static final Property<String> MYSQL_COL_SALT =
PropertyInitializer.newProperty("DataSource.mySQLColumnSalt", ""); newProperty("DataSource.mySQLColumnSalt", "");
@Comment("Column for storing players emails") @Comment("Column for storing players emails")
public static final Property<String> MYSQL_COL_EMAIL = public static final Property<String> MYSQL_COL_EMAIL =
PropertyInitializer.newProperty("DataSource.mySQLColumnEmail", "email"); newProperty("DataSource.mySQLColumnEmail", "email");
@Comment("Column for storing if a player is logged in or not") @Comment("Column for storing if a player is logged in or not")
public static final Property<String> MYSQL_COL_ISLOGGED = public static final Property<String> MYSQL_COL_ISLOGGED =
PropertyInitializer.newProperty("DataSource.mySQLColumnLogged", "isLogged"); newProperty("DataSource.mySQLColumnLogged", "isLogged");
@Comment("Column for storing if a player has a valid session or not") @Comment("Column for storing if a player has a valid session or not")
public static final Property<String> MYSQL_COL_HASSESSION = public static final Property<String> MYSQL_COL_HASSESSION =
PropertyInitializer.newProperty("DataSource.mySQLColumnHasSession", "hasSession"); newProperty("DataSource.mySQLColumnHasSession", "hasSession");
@Comment("Column for storing a player's TOTP key (for two-factor authentication)") @Comment("Column for storing a player's TOTP key (for two-factor authentication)")
public static final Property<String> MYSQL_COL_TOTP_KEY = public static final Property<String> MYSQL_COL_TOTP_KEY =
PropertyInitializer.newProperty("DataSource.mySQLtotpKey", "totp"); newProperty("DataSource.mySQLtotpKey", "totp");
@Comment("Column for storing the player's last IP") @Comment("Column for storing the player's last IP")
public static final Property<String> MYSQL_COL_LAST_IP = public static final Property<String> MYSQL_COL_LAST_IP =
PropertyInitializer.newProperty("DataSource.mySQLColumnIp", "ip"); newProperty("DataSource.mySQLColumnIp", "ip");
@Comment("Column for storing players lastlogins") @Comment("Column for storing players lastlogins")
public static final Property<String> MYSQL_COL_LASTLOGIN = public static final Property<String> MYSQL_COL_LASTLOGIN =
PropertyInitializer.newProperty("DataSource.mySQLColumnLastLogin", "lastlogin"); newProperty("DataSource.mySQLColumnLastLogin", "lastlogin");
@Comment("Column storing the registration date") @Comment("Column storing the registration date")
public static final Property<String> MYSQL_COL_REGISTER_DATE = public static final Property<String> MYSQL_COL_REGISTER_DATE =
PropertyInitializer.newProperty("DataSource.mySQLColumnRegisterDate", "regdate"); newProperty("DataSource.mySQLColumnRegisterDate", "regdate");
@Comment("Column for storing the IP address at the time of registration") @Comment("Column for storing the IP address at the time of registration")
public static final Property<String> MYSQL_COL_REGISTER_IP = public static final Property<String> MYSQL_COL_REGISTER_IP =
PropertyInitializer.newProperty("DataSource.mySQLColumnRegisterIp", "regip"); newProperty("DataSource.mySQLColumnRegisterIp", "regip");
@Comment("Column for storing player LastLocation - X") @Comment("Column for storing player LastLocation - X")
public static final Property<String> MYSQL_COL_LASTLOC_X = public static final Property<String> MYSQL_COL_LASTLOC_X =
PropertyInitializer.newProperty("DataSource.mySQLlastlocX", "x"); newProperty("DataSource.mySQLlastlocX", "x");
@Comment("Column for storing player LastLocation - Y") @Comment("Column for storing player LastLocation - Y")
public static final Property<String> MYSQL_COL_LASTLOC_Y = public static final Property<String> MYSQL_COL_LASTLOC_Y =
PropertyInitializer.newProperty("DataSource.mySQLlastlocY", "y"); newProperty("DataSource.mySQLlastlocY", "y");
@Comment("Column for storing player LastLocation - Z") @Comment("Column for storing player LastLocation - Z")
public static final Property<String> MYSQL_COL_LASTLOC_Z = public static final Property<String> MYSQL_COL_LASTLOC_Z =
PropertyInitializer.newProperty("DataSource.mySQLlastlocZ", "z"); newProperty("DataSource.mySQLlastlocZ", "z");
@Comment("Column for storing player LastLocation - World Name") @Comment("Column for storing player LastLocation - World Name")
public static final Property<String> MYSQL_COL_LASTLOC_WORLD = public static final Property<String> MYSQL_COL_LASTLOC_WORLD =
PropertyInitializer.newProperty("DataSource.mySQLlastlocWorld", "world"); newProperty("DataSource.mySQLlastlocWorld", "world");
@Comment("Column for storing player LastLocation - Yaw") @Comment("Column for storing player LastLocation - Yaw")
public static final Property<String> MYSQL_COL_LASTLOC_YAW = public static final Property<String> MYSQL_COL_LASTLOC_YAW =
PropertyInitializer.newProperty("DataSource.mySQLlastlocYaw", "yaw"); newProperty("DataSource.mySQLlastlocYaw", "yaw");
@Comment("Column for storing player LastLocation - Pitch") @Comment("Column for storing player LastLocation - Pitch")
public static final Property<String> MYSQL_COL_LASTLOC_PITCH = public static final Property<String> MYSQL_COL_LASTLOC_PITCH =
PropertyInitializer.newProperty("DataSource.mySQLlastlocPitch", "pitch"); newProperty("DataSource.mySQLlastlocPitch", "pitch");
@Comment("Column for storing players uuids (optional)") @Comment("Column for storing players uuids (optional)")
public static final Property<String> MYSQL_COL_PLAYER_UUID = public static final Property<String> MYSQL_COL_PLAYER_UUID =
PropertyInitializer.newProperty("DataSource.mySQLPlayerUUID", ""); newProperty("DataSource.mySQLPlayerUUID", "");
@Comment("Column for storing players groups") @Comment("Column for storing players groups")
public static final Property<String> MYSQL_COL_GROUP = public static final Property<String> MYSQL_COL_GROUP =
PropertyInitializer.newProperty("ExternalBoardOptions.mySQLColumnGroup", ""); newProperty("ExternalBoardOptions.mySQLColumnGroup", "");
@Comment("Overrides the size of the DB Connection Pool, default = 10") @Comment("Overrides the size of the DB Connection Pool, default = 10")
public static final Property<Integer> MYSQL_POOL_SIZE = public static final Property<Integer> MYSQL_POOL_SIZE =
PropertyInitializer.newProperty("DataSource.poolSize", 10); newProperty("DataSource.poolSize", 10);
@Comment({"The maximum lifetime of a connection in the pool, default = 1800 seconds", @Comment({"The maximum lifetime of a connection in the pool, default = 1800 seconds",
"You should set this at least 30 seconds less than mysql server wait_timeout"}) "You should set this at least 30 seconds less than mysql server wait_timeout"})
public static final Property<Integer> MYSQL_CONNECTION_MAX_LIFETIME = public static final Property<Integer> MYSQL_CONNECTION_MAX_LIFETIME =
PropertyInitializer.newProperty("DataSource.maxLifetime", 1800); newProperty("DataSource.maxLifetime", 1800);
private DatabaseSettings() { private DatabaseSettings() {
} }

View File

@ -1,6 +1,9 @@
dependencies { dependencies {
compileOnly(project(":project:module-common")) compileOnly(project(":project:module-common"))
compileOnly(project(":project:module-util")) compileOnly(project(":project:module-util"))
compileOnly(project(":project:module-logger")) compileOnly(project(":project:module-logger"))
compileOnly(project(":project:module-configuration")) compileOnly(project(":project:module-configuration"))
compileOnly(libs.guava)
compileOnly(libs.configme)
compileOnly(libs.jalu.injector)
} }

View File

@ -1,5 +1,7 @@
dependencies { dependencies {
compileOnly(project(":project:module-util")) compileOnly(project(":project:module-util"))
compileOnly(project(":project:module-logger"))
compileOnly(project(":project:module-common"))
compileOnly(libs.guava) compileOnly(libs.guava)
compileOnly(libs.configme) compileOnly(libs.configme)
compileOnly(libs.jalu.injector) compileOnly(libs.jalu.injector)