back port to jdk 8
This commit is contained in:
parent
e3f4aa888c
commit
a60cd29ece
|
|
@ -8,7 +8,7 @@ version = '1.2.0'
|
||||||
group = 'vip.fubuki.playersync' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group = 'vip.fubuki.playersync' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = 'playersync'
|
archivesBaseName = 'playersync'
|
||||||
|
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||||
|
|
||||||
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
|
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
|
||||||
minecraft {
|
minecraft {
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,7 @@ public class PlayerSync
|
||||||
"xp int,food_level int,score int,health int,online boolean, last_server int, PRIMARY KEY (uuid))");
|
"xp int,food_level int,score int,health int,online boolean, last_server int, PRIMARY KEY (uuid))");
|
||||||
JDBCsetUp.executeUpdate("CREATE TABLE IF NOT EXISTS chat (player CHAR(36) NOT NULL,message TEXT," +
|
JDBCsetUp.executeUpdate("CREATE TABLE IF NOT EXISTS chat (player CHAR(36) NOT NULL,message TEXT," +
|
||||||
"timestamp BIGINT)");
|
"timestamp BIGINT)");
|
||||||
JDBCsetUp.executeUpdate("""
|
JDBCsetUp.executeUpdate(" CREATE TABLE IF NOT EXISTS server_info (`id` INT NOT NULL,`enable` boolean NOT NULL,`last_update` BIGINT NOT NULL,PRIMARY KEY (`id`));");
|
||||||
CREATE TABLE IF NOT EXISTS server_info (
|
|
||||||
`id` INT NOT NULL,
|
|
||||||
`enable` boolean NOT NULL,
|
|
||||||
`last_update` BIGINT NOT NULL,
|
|
||||||
PRIMARY KEY (`id`));""");
|
|
||||||
long current = System.currentTimeMillis();
|
long current = System.currentTimeMillis();
|
||||||
JDBCsetUp.executeUpdate("INSERT INTO server_info(id,enable,last_update) " +
|
JDBCsetUp.executeUpdate("INSERT INTO server_info(id,enable,last_update) " +
|
||||||
"VALUES(" + JdbcConfig.SERVER_ID.get() + ",true," + current + ") " +
|
"VALUES(" + JdbcConfig.SERVER_ID.get() + ",true," + current + ") " +
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class JdbcConfig {
|
||||||
USE_SSL = COMMON_BUILDER.comment("whether use SSL").define("use_ssl", false);
|
USE_SSL = COMMON_BUILDER.comment("whether use SSL").define("use_ssl", false);
|
||||||
USERNAME = COMMON_BUILDER.comment("username").define("user_name", "root");
|
USERNAME = COMMON_BUILDER.comment("username").define("user_name", "root");
|
||||||
PASSWORD = COMMON_BUILDER.comment("password").define("password", "password");
|
PASSWORD = COMMON_BUILDER.comment("password").define("password", "password");
|
||||||
SERVER_ID = COMMON_BUILDER.comment("the server id should be unique").define("Server_id", new Random().nextInt(1,Integer.MAX_VALUE-1));
|
SERVER_ID = COMMON_BUILDER.comment("the server id should be unique").define("Server_id", (int) (Math.random()*Integer.MAX_VALUE));
|
||||||
SYNC_WORLD = COMMON_BUILDER.comment("The worlds that will be synchronized.If running in server it is supposed to have only one").define("sync_world", new ArrayList<>());
|
SYNC_WORLD = COMMON_BUILDER.comment("The worlds that will be synchronized.If running in server it is supposed to have only one").define("sync_world", new ArrayList<>());
|
||||||
SYNC_CHAT= COMMON_BUILDER.comment("Whether synchronize chat").define("sync_chat", true);
|
SYNC_CHAT= COMMON_BUILDER.comment("Whether synchronize chat").define("sync_chat", true);
|
||||||
COMMON_BUILDER.pop();
|
COMMON_BUILDER.pop();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user