Update SubData

This commit is contained in:
ME1312 2019-05-27 15:33:52 -04:00
parent 08e3e202e3
commit 071e0bceab
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
9 changed files with 22 additions and 14 deletions

View File

@ -30,19 +30,19 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Server</artifactId>
<version>19w20g</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -12,6 +12,7 @@ import net.ME1312.SubData.Server.ClientHandler;
import net.ME1312.SubServers.Bungee.Library.Compatibility.GalaxiInfo;
import net.ME1312.SubServers.Bungee.Library.Compatibility.Logger;
import net.ME1312.SubServers.Bungee.Network.Packet.PacketExCheckPermission;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.ClickEvent;
@ -107,14 +108,16 @@ public final class SubCommand extends CommandX {
}
Version galaxi = GalaxiInfo.getVersion();
Version bungee = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getBuildVersion").invoke(plugin), null);
Version galaxibuild = GalaxiInfo.getSignature();
Version bungeebuild = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getBuildSignature").invoke(plugin), null);
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Bungee:");
sender.sendMessage(" " + System.getProperty("os.name") + ((!System.getProperty("os.name").toLowerCase().startsWith("windows"))?' ' + System.getProperty("os.version"):"") + ((osarch != null)?" [" + osarch + ']':"") + ',');
sender.sendMessage(" Java " + System.getProperty("java.version") + ((javaarch != null)?" [" + javaarch + ']':"") + ',');
if (galaxi != null)
Util.isException(() -> sender.sendMessage(" GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ','));
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + plugin.getVersion() + ((plugin.isPatched)?" [Patched]":"") + ',');
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + ((bungee != null)?bungee:plugin.getVersion()) + ((bungeebuild != null)?" (" + bungeebuild + ')':"") + ((plugin.isPatched)?" [Patched]":"") + ',');
sender.sendMessage(" SubServers.Bungee v" + SubPlugin.version.toExtendedString() + ((plugin.api.getWrapperBuild() != null)?" (" + plugin.api.getWrapperBuild() + ')':""));
sender.sendMessage("");
new Thread(() -> {

View File

@ -48,13 +48,13 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>19w20g</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -74,6 +74,7 @@ public final class SubPlugin extends JavaPlugin {
new UniversalFile(new File(System.getProperty("user.dir")), "subdata.json").delete();
}
if (new UniversalFile(new File(System.getProperty("user.dir")), "subdata.rsa.key").exists()) {
if (new UniversalFile(getDataFolder(), "subdata.rsa.key").exists()) new UniversalFile(getDataFolder(), "subdata.rsa.key").delete();
Files.move(new UniversalFile(new File(System.getProperty("user.dir")), "subdata.rsa.key").toPath(), new UniversalFile(getDataFolder(), "subdata.rsa.key").toPath());
}

View File

@ -30,13 +30,13 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>19w20g</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -90,6 +90,7 @@ public final class SubPlugin {
new UniversalFile(new File(System.getProperty("user.dir")), "subdata.json").delete();
}
if (new UniversalFile(new File(System.getProperty("user.dir")), "subdata.rsa.key").exists()) {
if (new UniversalFile(dir, "subdata.rsa.key").exists()) new UniversalFile(dir, "subdata.rsa.key").delete();
Files.move(new UniversalFile(new File(System.getProperty("user.dir")), "subdata.rsa.key").toPath(), new UniversalFile(dir, "subdata.rsa.key").toPath());
}

View File

@ -20,13 +20,13 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>19w20g</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -30,19 +30,19 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w21a</version>
<version>19w22a</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>19w20g</version>
<version>19w22a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -14,6 +14,7 @@ import net.ME1312.SubServers.Sync.Network.API.*;
import net.ME1312.SubServers.Sync.Network.Packet.*;
import net.ME1312.SubServers.Sync.Server.ServerContainer;
import net.ME1312.SubServers.Sync.Server.SubServerContainer;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.ClickEvent;
@ -108,14 +109,16 @@ public final class SubCommand extends CommandX {
}
Version galaxi = GalaxiInfo.getVersion();
Version bungee = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getBuildVersion").invoke(plugin), null);
Version galaxibuild = GalaxiInfo.getSignature();
Version bungeebuild = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getBuildSignature").invoke(plugin), null);
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Sync:");
sender.sendMessage(" " + System.getProperty("os.name") + ((!System.getProperty("os.name").toLowerCase().startsWith("windows"))?' ' + System.getProperty("os.version"):"") + ((osarch != null)?" [" + osarch + ']':"") + ',');
sender.sendMessage(" Java " + System.getProperty("java.version") + ((javaarch != null)?" [" + javaarch + ']':"") + ',');
if (galaxi != null)
Util.isException(() -> sender.sendMessage("GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ','));
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + plugin.getVersion() + ((plugin.isPatched)?" [Patched]":"") + ',');
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + ((bungee != null)?bungee:plugin.getVersion()) + ((bungeebuild != null)?" (" + bungeebuild + ')':"") + ((plugin.isPatched)?" [Patched]":"") + ',');
sender.sendMessage(" SubServers.Sync v" + SubPlugin.version.toExtendedString() + ((plugin.api.getWrapperBuild() != null)?" (" + plugin.api.getWrapperBuild() + ')':""));
sender.sendMessage("");
new Thread(() -> {