mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-10 20:50:05 +01:00
Update GalaxiEngine
This commit is contained in:
parent
76e11f0a0d
commit
2cb783326a
@ -30,13 +30,13 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiEngine</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -106,9 +106,9 @@ public interface BungeeAPI {
|
||||
Version getWrapperVersion();
|
||||
|
||||
/**
|
||||
* Gets the SubServers Build Signature
|
||||
* Gets the SubServers Build Version
|
||||
*
|
||||
* @return SubServers Build Signature (or null if unsigned)
|
||||
* @return SubServers Build Version (or null if unsigned)
|
||||
*/
|
||||
Version getWrapperBuild();
|
||||
|
||||
|
@ -28,11 +28,11 @@ public class GalaxiInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Galaxi Build Signature
|
||||
* Get the Galaxi Build Version
|
||||
*
|
||||
* @return Galaxi Build Signature
|
||||
* @return Galaxi Build Version
|
||||
*/
|
||||
public static Version getSignature() {
|
||||
public static Version getBuild() {
|
||||
try {
|
||||
Manifest manifest = new Manifest(Class.forName("net.ME1312.Galaxi.Engine.GalaxiEngine").getResourceAsStream("/META-INF/GalaxiEngine.MF"));
|
||||
if (manifest.getMainAttributes().getValue("Implementation-Version") != null && manifest.getMainAttributes().getValue("Implementation-Version").length() > 0) {
|
||||
|
@ -30,14 +30,14 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiEngine</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -50,10 +50,10 @@ public final class Launch {
|
||||
joptsimple.OptionSet options = parser.parse(args);
|
||||
if(options.has("version") || options.has("v")) {
|
||||
Version galaxi = GalaxiInfo.getVersion();
|
||||
Version galaxibuild = GalaxiInfo.getSignature();
|
||||
Version galaxibuild = GalaxiInfo.getBuild();
|
||||
|
||||
System.out.println("");
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println("Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ',');
|
||||
if (galaxi != null) System.out.println("GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ',');
|
||||
System.out.println("BungeeCord" + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ((patched)?" [Patched]":"") + ',');
|
||||
|
@ -88,12 +88,12 @@ public final class SubCommand extends CommandX {
|
||||
sender.sendMessages(printHelp());
|
||||
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
|
||||
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);
|
||||
Version bungee = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getForkVersion").invoke(plugin), null);
|
||||
Version galaxibuild = GalaxiInfo.getBuild();
|
||||
Version bungeebuild = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getForkBuild").invoke(plugin), null);
|
||||
|
||||
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Bungee:");
|
||||
sender.sendMessage(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
sender.sendMessage(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
sender.sendMessage(" Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ',');
|
||||
if (galaxi != null) Util.isException(() -> sender.sendMessage(" GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ','));
|
||||
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + ((bungee != null)?bungee:plugin.getVersion()) + ((bungeebuild != null)?" (" + bungeebuild + ')':"") + ((plugin.isPatched)?" [Patched]":"") + ',');
|
||||
|
@ -48,7 +48,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -136,9 +136,9 @@ public final class SubAPI extends ClientAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SubServers Build Signature
|
||||
* Gets the SubServers Build Version
|
||||
*
|
||||
* @return SubServers Build Signature (or null if unsigned)
|
||||
* @return SubServers Build Version (or null if unsigned)
|
||||
*/
|
||||
public Version getPluginBuild() {
|
||||
return (SubPlugin.class.getPackage().getSpecificationTitle() != null)?new Version(SubPlugin.class.getPackage().getSpecificationTitle()):null;
|
||||
|
@ -65,7 +65,7 @@ public final class SubCommand extends BukkitCommand {
|
||||
sender.sendMessage(printHelp(sender, label));
|
||||
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
|
||||
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Version").replace("$str$", "SubServers.Client.Bukkit"));
|
||||
sender.sendMessage(ChatColor.WHITE + " " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ChatColor.RESET + ',');
|
||||
sender.sendMessage(ChatColor.WHITE + " " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ChatColor.RESET + ',');
|
||||
sender.sendMessage(ChatColor.WHITE + " Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ChatColor.RESET + ',');
|
||||
sender.sendMessage(ChatColor.WHITE + " " + Bukkit.getName() + ' ' + Bukkit.getVersion() + ChatColor.RESET + ',');
|
||||
sender.sendMessage(ChatColor.WHITE + " SubServers.Client.Bukkit v" + plugin.version.toExtendedString() + ((plugin.api.getPluginBuild() != null)?" (" + plugin.api.getPluginBuild() + ')':""));
|
||||
|
@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -138,9 +138,9 @@ public final class SubAPI extends ClientAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SubServers Build Signature
|
||||
* Gets the SubServers Build Version
|
||||
*
|
||||
* @return SubServers Build Signature (or null if unsigned)
|
||||
* @return SubServers Build Version (or null if unsigned)
|
||||
*/
|
||||
public Version getPluginBuild() {
|
||||
return (SubPlugin.class.getPackage().getSpecificationTitle() != null)?new Version(SubPlugin.class.getPackage().getSpecificationTitle()):null;
|
||||
|
@ -184,7 +184,7 @@ public final class SubCommand implements CommandExecutor {
|
||||
if (container == null) container = Util.getDespiteException(() -> (PluginContainer) org.spongepowered.api.Platform.class.getMethod("getImplementation").invoke(Sponge.getPlatform()), null);
|
||||
|
||||
sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers","Command.Version").replace("$str$", "SubServers.Client.Sponge")));
|
||||
sender.sendMessage(Text.builder(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"")).color(TextColors.WHITE).append(Text.of(",")).build());
|
||||
sender.sendMessage(Text.builder(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"")).color(TextColors.WHITE).append(Text.of(",")).build());
|
||||
sender.sendMessage(Text.builder(" Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"")).color(TextColors.WHITE).append(Text.of(",")).build());
|
||||
sender.sendMessage(Text.builder(" " + container.getName() + ' ' + container.getVersion().get()).color(TextColors.WHITE).append(Text.of(",")).build());
|
||||
sender.sendMessage(Text.builder(" SubServers.Client.Sponge v" + plugin.version.toExtendedString() + ((plugin.api.getPluginBuild() != null)?" (" + plugin.api.getPluginBuild() + ')':"")).color(TextColors.WHITE).build());
|
||||
|
@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiEngine</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -94,7 +94,7 @@ public final class ExHost {
|
||||
} catch (Exception e) {}
|
||||
|
||||
System.out.println("");
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println("Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ',');
|
||||
System.out.println(GalaxiEngine.class.getAnnotation(App.class).name() + " v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ',');
|
||||
System.out.println(ExHost.class.getAnnotation(App.class).name() + " v" + subservers.toExtendedString() + ((subserversbuild != null)?" (" + subserversbuild + ')':""));
|
||||
@ -115,7 +115,7 @@ public final class ExHost {
|
||||
try {
|
||||
info = PluginInfo.getPluginInfo(this);
|
||||
info.setLogger(log);
|
||||
if (ExHost.class.getPackage().getSpecificationTitle() != null) info.setSignature(new Version(ExHost.class.getPackage().getSpecificationTitle()));
|
||||
if (ExHost.class.getPackage().getSpecificationTitle() != null) info.setBuild(new Version(ExHost.class.getPackage().getSpecificationTitle()));
|
||||
info.setIcon(ExHost.class.getResourceAsStream("/net/ME1312/SubServers/Host/Library/Files/icon.png"));
|
||||
engine = GalaxiEngine.init(info);
|
||||
log.info.println("Loading SubServers.Host v" + info.getVersion().toString() + " Libraries");
|
||||
|
@ -29,7 +29,7 @@ public class ConfigUpdater {
|
||||
YAMLSection rewritten = new YAMLSection();
|
||||
|
||||
Version was = existing.getMap("Settings", new ObjectMap<>()).getVersion("Version", new Version(0));
|
||||
Version now = SubAPI.getInstance().getAppInfo().getSignature();
|
||||
Version now = SubAPI.getInstance().getAppInfo().getBuild();
|
||||
|
||||
int i = 0;
|
||||
if (now == null) now = UNSIGNED;
|
||||
|
@ -30,14 +30,14 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiUtil</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiEngine</artifactId>
|
||||
<version>21w06a</version>
|
||||
<version>21w07a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -49,10 +49,10 @@ public final class Launch {
|
||||
joptsimple.OptionSet options = parser.parse(args);
|
||||
if(options.has("version") || options.has("v")) {
|
||||
Version galaxi = GalaxiInfo.getVersion();
|
||||
Version galaxibuild = GalaxiInfo.getSignature();
|
||||
Version galaxibuild = GalaxiInfo.getBuild();
|
||||
|
||||
System.out.println("");
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println(Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
System.out.println("Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ',');
|
||||
if (galaxi != null) System.out.println("GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ',');
|
||||
System.out.println("BungeeCord" + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ((patched)?" [Patched]":"") + ',');
|
||||
|
@ -180,9 +180,9 @@ public final class SubAPI extends ClientAPI implements BungeeAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SubServers Build Signature
|
||||
* Gets the SubServers Build Version
|
||||
*
|
||||
* @return SubServers Build Signature (or null if unsigned)
|
||||
* @return SubServers Build Version (or null if unsigned)
|
||||
*/
|
||||
public Version getWrapperBuild() {
|
||||
return (ExProxy.class.getPackage().getSpecificationTitle() != null)?new Version(ExProxy.class.getPackage().getSpecificationTitle()):null;
|
||||
|
@ -96,12 +96,12 @@ public final class SubCommand extends CommandX {
|
||||
sender.sendMessages(printHelp());
|
||||
} else if (args[0].equalsIgnoreCase("version") || args[0].equalsIgnoreCase("ver")) {
|
||||
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);
|
||||
Version bungee = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getForkVersion").invoke(plugin), null);
|
||||
Version galaxibuild = GalaxiInfo.getBuild();
|
||||
Version bungeebuild = Util.getDespiteException(() -> (Version) BungeeCord.class.getMethod("getForkBuild").invoke(plugin), null);
|
||||
|
||||
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Sync:");
|
||||
sender.sendMessage(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
sender.sendMessage(" " + Platform.getSystemName() + ' ' + Platform.getSystemVersion() + ((!Platform.getSystemVersion().equals(Platform.getSystemBuild()))?" (" + Platform.getSystemBuild() + ')':"") + ((!Platform.getSystemArchitecture().equals("unknown"))?" [" + Platform.getSystemArchitecture() + ']':"") + ',');
|
||||
sender.sendMessage(" Java " + Platform.getJavaVersion() + ((!Platform.getJavaArchitecture().equals("unknown"))?" [" + Platform.getJavaArchitecture() + ']':"") + ',');
|
||||
if (galaxi != null) Util.isException(() -> sender.sendMessage(" GalaxiEngine v" + galaxi.toExtendedString() + ((galaxibuild != null)?" (" + galaxibuild + ')':"") + ','));
|
||||
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isGalaxi)?" v":" ") + ((bungee != null)?bungee:plugin.getVersion()) + ((bungeebuild != null)?" (" + bungeebuild + ')':"") + ((plugin.isPatched)?" [Patched]":"") + ',');
|
||||
|
Loading…
Reference in New Issue
Block a user