mirror of
https://github.com/kaboomserver/extras.git
synced 2025-07-26 23:45:15 +00:00
Fix fallback behavior
This commit is contained in:
parent
dd8b5a4729
commit
b1d51a807b
1 changed files with 5 additions and 3 deletions
|
@ -17,7 +17,7 @@ import java.lang.management.ManagementFactory;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|
||||||
public final class CommandServerInfo implements CommandExecutor {
|
public final class CommandServerInfo implements CommandExecutor {
|
||||||
private static final @Nullable String[] GPU_DEVICES;
|
private static final String[] GPU_DEVICES;
|
||||||
private static final @Nullable String PROCESSOR_NAME;
|
private static final @Nullable String PROCESSOR_NAME;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -48,7 +48,7 @@ public final class CommandServerInfo implements CommandExecutor {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (hardwareInfo == null) {
|
if (hardwareInfo == null) {
|
||||||
GPU_DEVICES = null;
|
GPU_DEVICES = new String[0];
|
||||||
PROCESSOR_NAME = null;
|
PROCESSOR_NAME = null;
|
||||||
} else {
|
} else {
|
||||||
GPU_DEVICES = hardwareInfo.first();
|
GPU_DEVICES = hardwareInfo.first();
|
||||||
|
@ -95,7 +95,9 @@ public final class CommandServerInfo implements CommandExecutor {
|
||||||
+ ManagementFactory.getRuntimeMXBean().getVmVersion()
|
+ ManagementFactory.getRuntimeMXBean().getVmVersion()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (PROCESSOR_NAME != null) {
|
||||||
sendInfoMessage(sender, "CPU model", PROCESSOR_NAME);
|
sendInfoMessage(sender, "CPU model", PROCESSOR_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
sendInfoMessage(sender, "CPU cores",
|
sendInfoMessage(sender, "CPU cores",
|
||||||
String.valueOf(Runtime.getRuntime().availableProcessors())
|
String.valueOf(Runtime.getRuntime().availableProcessors())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue