mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-25 19:56:24 +01:00
Update app launchers
This commit is contained in:
parent
9bf1bb0710
commit
594ba30c64
@ -34,7 +34,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Server</artifactId>
|
<artifactId>Server</artifactId>
|
||||||
<version>21w26c</version>
|
<version>21w33a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -23,6 +23,7 @@ public final class Launch {
|
|||||||
@SuppressWarnings({"deprecation", "unchecked"})
|
@SuppressWarnings({"deprecation", "unchecked"})
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
System.setProperty("jdk.lang.Process.allowAmbiguousCommands", "true");
|
System.setProperty("jdk.lang.Process.allowAmbiguousCommands", "true");
|
||||||
|
System.setProperty("jdk.util.jar.enableMultiRelease", "force");
|
||||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||||
|
|
||||||
if (Util.getDespiteException(() -> Class.forName("net.md_5.bungee.BungeeCord") == null, true)) {
|
if (Util.getDespiteException(() -> Class.forName("net.md_5.bungee.BungeeCord") == null, true)) {
|
||||||
@ -65,7 +66,7 @@ public final class Launch {
|
|||||||
if (net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion() != null) {
|
if (net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion() != null) {
|
||||||
Date date = (new SimpleDateFormat("yyyyMMdd")).parse(net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion());
|
Date date = (new SimpleDateFormat("yyyyMMdd")).parse(net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion());
|
||||||
Calendar line = Calendar.getInstance();
|
Calendar line = Calendar.getInstance();
|
||||||
line.add(3, -4);
|
line.add(Calendar.WEEK_OF_YEAR, -8);
|
||||||
if (date.before(line.getTime())) {
|
if (date.before(line.getTime())) {
|
||||||
System.out.println("*** Warning: BungeeCord is outdated ***");
|
System.out.println("*** Warning: BungeeCord is outdated ***");
|
||||||
System.out.println("*** Please download a new build from: ***");
|
System.out.println("*** Please download a new build from: ***");
|
||||||
|
@ -6,6 +6,8 @@ import net.ME1312.Galaxi.Library.Map.ObjectMap;
|
|||||||
import net.ME1312.Galaxi.Library.Version.Version;
|
import net.ME1312.Galaxi.Library.Version.Version;
|
||||||
import net.ME1312.SubServers.Client.Bukkit.SubAPI;
|
import net.ME1312.SubServers.Client.Bukkit.SubAPI;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -36,7 +38,7 @@ public class ConfigUpdater {
|
|||||||
if (!existing.contains("Settings") || !existing.getMap("Settings").contains("Version")) {
|
if (!existing.contains("Settings") || !existing.getMap("Settings").contains("Version")) {
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
System.out.println("SubServers > Created ./plugins/SubServers-Client-Bukkit/config.yml");
|
Bukkit.getLogger().info("SubServers > Created ./plugins/SubServers-Client-Bukkit/config.yml");
|
||||||
} else {
|
} else {
|
||||||
if (was.compareTo(new Version("19w17a")) <= 0) {
|
if (was.compareTo(new Version("19w17a")) <= 0) {
|
||||||
if (existing.getMap("Settings", new YAMLSection()).contains("Ingame-Access"))
|
if (existing.getMap("Settings", new YAMLSection()).contains("Ingame-Access"))
|
||||||
@ -49,7 +51,7 @@ public class ConfigUpdater {
|
|||||||
// i++
|
// i++
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (i > 0) System.out.println("SubServers > Updated ./plugins/SubServers-Client-Bukkit/config.yml (" + i + " pass" + ((i != 1)?"es":"") + ")");
|
if (i > 0) Bukkit.getLogger().info("SubServers > Updated ./plugins/SubServers-Client-Bukkit/config.yml (" + i + " pass" + ((i != 1)?"es":"") + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
@ -103,20 +103,20 @@ public final class SubPlugin extends JavaPlugin {
|
|||||||
subprotocol.registerCipher("AES-192", new AES(192, config.get().getMap("Settings").getMap("SubData").getRawString("Password")));
|
subprotocol.registerCipher("AES-192", new AES(192, config.get().getMap("Settings").getMap("SubData").getRawString("Password")));
|
||||||
subprotocol.registerCipher("AES-256", new AES(256, config.get().getMap("Settings").getMap("SubData").getRawString("Password")));
|
subprotocol.registerCipher("AES-256", new AES(256, config.get().getMap("Settings").getMap("SubData").getRawString("Password")));
|
||||||
|
|
||||||
System.out.println("SubData > AES Encryption Available");
|
Bukkit.getLogger().info("SubData > AES Encryption Available");
|
||||||
}
|
}
|
||||||
if (new UniversalFile(dir, "subdata.rsa.key").exists()) {
|
if (new UniversalFile(dir, "subdata.rsa.key").exists()) {
|
||||||
try {
|
try {
|
||||||
subprotocol.registerCipher("RSA", new RSA(new UniversalFile(dir, "subdata.rsa.key")));
|
subprotocol.registerCipher("RSA", new RSA(new UniversalFile(dir, "subdata.rsa.key")));
|
||||||
System.out.println("SubData > RSA Encryption Available");
|
Bukkit.getLogger().info("SubData > RSA Encryption Available");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reconnect = true;
|
reconnect = true;
|
||||||
System.out.println("SubData > ");
|
Bukkit.getLogger().info("SubData > ");
|
||||||
System.out.println("SubData > Connecting to /" + config.get().getMap("Settings").getMap("SubData").getRawString("Address", "127.0.0.1:4391"));
|
Bukkit.getLogger().info("SubData > Connecting to /" + config.get().getMap("Settings").getMap("SubData").getRawString("Address", "127.0.0.1:4391"));
|
||||||
connect(null);
|
connect(null);
|
||||||
|
|
||||||
gui = new DefaultUIHandler(this);
|
gui = new DefaultUIHandler(this);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w26c</version>
|
<version>21w33a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -13,6 +13,7 @@ public final class Launch {
|
|||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
System.setProperty("jdk.lang.Process.allowAmbiguousCommands", "true");
|
System.setProperty("jdk.lang.Process.allowAmbiguousCommands", "true");
|
||||||
|
System.setProperty("jdk.util.jar.enableMultiRelease", "force");
|
||||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||||
boolean exists = false;
|
boolean exists = false;
|
||||||
try {
|
try {
|
||||||
|
@ -23,6 +23,7 @@ public final class Launch {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings({"deprecation", "unchecked"})
|
@SuppressWarnings({"deprecation", "unchecked"})
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
System.setProperty("jdk.util.jar.enableMultiRelease", "force");
|
||||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||||
|
|
||||||
if (Util.getDespiteException(() -> Class.forName("net.md_5.bungee.BungeeCord") == null, true)) {
|
if (Util.getDespiteException(() -> Class.forName("net.md_5.bungee.BungeeCord") == null, true)) {
|
||||||
@ -65,7 +66,7 @@ public final class Launch {
|
|||||||
if (net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion() != null) {
|
if (net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion() != null) {
|
||||||
Date date = (new SimpleDateFormat("yyyyMMdd")).parse(net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion());
|
Date date = (new SimpleDateFormat("yyyyMMdd")).parse(net.md_5.bungee.BungeeCord.class.getPackage().getSpecificationVersion());
|
||||||
Calendar line = Calendar.getInstance();
|
Calendar line = Calendar.getInstance();
|
||||||
line.add(3, -4);
|
line.add(Calendar.WEEK_OF_YEAR, -8);
|
||||||
if (date.before(line.getTime())) {
|
if (date.before(line.getTime())) {
|
||||||
System.out.println("*** Warning: BungeeCord is outdated ***");
|
System.out.println("*** Warning: BungeeCord is outdated ***");
|
||||||
System.out.println("*** Please download a new build from: ***");
|
System.out.println("*** Please download a new build from: ***");
|
||||||
|
Loading…
Reference in New Issue
Block a user