mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FEATURE] Grand libraries update
This commit is contained in:
parent
344c61eaee
commit
b545c099eb
7 changed files with 23 additions and 81 deletions
|
@ -6,8 +6,6 @@
|
|||
import pro.gravit.launchserver.command.auth.UsernameToUUIDCommand;
|
||||
import pro.gravit.launchserver.command.basic.*;
|
||||
import pro.gravit.launchserver.command.hash.*;
|
||||
import pro.gravit.launchserver.command.install.CheckInstallCommand;
|
||||
import pro.gravit.launchserver.command.install.MultiCommand;
|
||||
import pro.gravit.launchserver.command.modules.LoadModuleCommand;
|
||||
import pro.gravit.launchserver.command.modules.ModulesCommand;
|
||||
import pro.gravit.launchserver.command.service.*;
|
||||
|
@ -64,8 +62,6 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand
|
|||
BaseCommandCategory service = new BaseCommandCategory();
|
||||
service.registerCommand("config", new ConfigCommand(server));
|
||||
service.registerCommand("serverStatus", new ServerStatusCommand(server));
|
||||
service.registerCommand("checkInstall", new CheckInstallCommand(server));
|
||||
service.registerCommand("multi", new MultiCommand(server));
|
||||
service.registerCommand("notify", new NotifyCommand(server));
|
||||
service.registerCommand("component", new ComponentCommand(server));
|
||||
service.registerCommand("clients", new ClientsCommand(server));
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
package pro.gravit.launchserver.command.install;
|
||||
|
||||
import pro.gravit.launchserver.LaunchServer;
|
||||
import pro.gravit.launchserver.command.Command;
|
||||
import pro.gravit.utils.helper.JVMHelper;
|
||||
import pro.gravit.utils.helper.LogHelper;
|
||||
|
||||
public class CheckInstallCommand extends Command {
|
||||
public CheckInstallCommand(LaunchServer server) {
|
||||
super(server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArgsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsageDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(String... args) {
|
||||
LogHelper.info("Check install success");
|
||||
JVMHelper.RUNTIME.exit(0);
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package pro.gravit.launchserver.command.install;
|
||||
|
||||
import pro.gravit.launchserver.LaunchServer;
|
||||
import pro.gravit.launchserver.command.Command;
|
||||
|
||||
public class MultiCommand extends Command {
|
||||
public MultiCommand(LaunchServer server) {
|
||||
super(server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArgsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsageDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(String... args) {
|
||||
for (String arg : args) {
|
||||
server.commandHandler.eval(arg, false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,8 @@
|
|||
import oshi.software.os.OperatingSystem;
|
||||
import pro.gravit.launcher.request.secure.HardwareReportRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HWIDProvider {
|
||||
public final SystemInfo systemInfo;
|
||||
public final OperatingSystem system;
|
||||
|
@ -41,13 +43,13 @@ public int getProcessorLogicalCount() {
|
|||
}
|
||||
|
||||
public boolean isBattery() {
|
||||
PowerSource[] powerSources = hardware.getPowerSources();
|
||||
return powerSources != null && powerSources.length != 0;
|
||||
List<PowerSource> powerSources = hardware.getPowerSources();
|
||||
return powerSources != null && powerSources.size() != 0;
|
||||
}
|
||||
|
||||
//Hardware Information
|
||||
public String getHWDiskID() {
|
||||
HWDiskStore[] hwDiskStore = hardware.getDiskStores();
|
||||
List<HWDiskStore> hwDiskStore = hardware.getDiskStores();
|
||||
long size = 0;
|
||||
HWDiskStore maxStore = null;
|
||||
for (HWDiskStore store : hwDiskStore) {
|
||||
|
@ -63,8 +65,8 @@ public String getHWDiskID() {
|
|||
}
|
||||
|
||||
public byte[] getDisplayID() {
|
||||
Display[] displays = hardware.getDisplays();
|
||||
if (displays == null || displays.length == 0) return null;
|
||||
List<Display> displays = hardware.getDisplays();
|
||||
if (displays == null || displays.size() == 0) return null;
|
||||
for (Display display : displays) {
|
||||
return display.getEdid();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||
compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
|
||||
compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
|
||||
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: rootProject['verBcprov']
|
||||
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: rootProject['verBcprov']
|
||||
api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson']
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
|
||||
testImplementation group: 'org.jline', name: 'jline', version: rootProject['verJline']
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import org.fusesource.jansi.Ansi;
|
||||
import org.fusesource.jansi.AnsiConsole;
|
||||
import org.fusesource.jansi.AnsiOutputStream;
|
||||
import pro.gravit.launcher.LauncherNetworkAPI;
|
||||
|
||||
import java.io.*;
|
||||
|
@ -409,7 +408,7 @@ public OutputEnity(Output output, OutputTypes type) {
|
|||
|
||||
private static final class JAnsiOutput extends WriterOutput {
|
||||
private JAnsiOutput(OutputStream output) {
|
||||
super(IOHelper.newWriter(new AnsiOutputStream(output)));
|
||||
super(IOHelper.newWriter(output));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
28
props.gradle
28
props.gradle
|
@ -1,18 +1,18 @@
|
|||
project.ext {
|
||||
verAsm = '7.3.1'
|
||||
verNetty = '4.1.48.Final'
|
||||
verOshiCore = '4.5.2'
|
||||
verJunit = '5.6.1'
|
||||
verGuavaC = '28.2-jre'
|
||||
verJansi = '1.18'
|
||||
verJline = '3.14.0'
|
||||
verBcprov = '1.46'
|
||||
verAsm = '9.1'
|
||||
verNetty = '4.1.60.Final'
|
||||
verOshiCore = '5.6.0'
|
||||
verJunit = '5.7.1'
|
||||
verGuavaC = '30.1-jre'
|
||||
verJansi = '2.3.2'
|
||||
verJline = '3.19.0'
|
||||
verBcprov = '1.68'
|
||||
verGson = '2.8.6'
|
||||
verBcpkix = '1.61'
|
||||
verSlf4j = '1.7.25'
|
||||
verMySQLConn = '8.0.19'
|
||||
verPostgreSQLConn = '42.2.11'
|
||||
verBcpkix = '1.68'
|
||||
verSlf4j = '1.7.30'
|
||||
verMySQLConn = '8.0.23'
|
||||
verPostgreSQLConn = '42.2.19'
|
||||
verProguard = '6.2.2'
|
||||
verLaunch4j = '3.12'
|
||||
verHibernate = '5.4.21.Final'
|
||||
verLaunch4j = '3.14'
|
||||
verHibernate = '5.4.29.Final'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue