mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-28 07:20:28 +01:00
Minor fixes; add CPU count to dump
This commit is contained in:
parent
66819aee83
commit
f0213d4b8e
3 changed files with 10 additions and 4 deletions
|
@ -36,17 +36,17 @@ import com.velocitypowered.api.plugin.Plugin;
|
||||||
import com.velocitypowered.api.proxy.ProxyServer;
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.geysermc.common.PlatformType;
|
import org.geysermc.common.PlatformType;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
|
||||||
import org.geysermc.geyser.GeyserBootstrap;
|
import org.geysermc.geyser.GeyserBootstrap;
|
||||||
import org.geysermc.geyser.session.auth.AuthType;
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
import org.geysermc.geyser.configuration.GeyserConfiguration;
|
import org.geysermc.geyser.configuration.GeyserConfiguration;
|
||||||
import org.geysermc.geyser.dump.BootstrapDumpInfo;
|
import org.geysermc.geyser.dump.BootstrapDumpInfo;
|
||||||
import org.geysermc.geyser.ping.GeyserLegacyPingPassthrough;
|
import org.geysermc.geyser.ping.GeyserLegacyPingPassthrough;
|
||||||
import org.geysermc.geyser.ping.IGeyserPingPassthrough;
|
import org.geysermc.geyser.ping.IGeyserPingPassthrough;
|
||||||
import org.geysermc.geyser.platform.velocity.command.GeyserVelocityCommandExecutor;
|
import org.geysermc.geyser.platform.velocity.command.GeyserVelocityCommandExecutor;
|
||||||
import org.geysermc.geyser.platform.velocity.command.GeyserVelocityCommandManager;
|
import org.geysermc.geyser.platform.velocity.command.GeyserVelocityCommandManager;
|
||||||
import org.geysermc.geyser.util.FileUtils;
|
import org.geysermc.geyser.session.auth.AuthType;
|
||||||
import org.geysermc.geyser.text.GeyserLocale;
|
import org.geysermc.geyser.text.GeyserLocale;
|
||||||
|
import org.geysermc.geyser.util.FileUtils;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class DumpInfo {
|
||||||
private static final long MEGABYTE = 1024L * 1024L;
|
private static final long MEGABYTE = 1024L * 1024L;
|
||||||
|
|
||||||
private final DumpInfo.VersionInfo versionInfo;
|
private final DumpInfo.VersionInfo versionInfo;
|
||||||
|
private final int cpuCount;
|
||||||
private Properties gitInfo;
|
private Properties gitInfo;
|
||||||
private final GeyserConfiguration config;
|
private final GeyserConfiguration config;
|
||||||
private final Floodgate floodgate;
|
private final Floodgate floodgate;
|
||||||
|
@ -79,6 +80,8 @@ public class DumpInfo {
|
||||||
public DumpInfo(boolean addLog) {
|
public DumpInfo(boolean addLog) {
|
||||||
this.versionInfo = new VersionInfo();
|
this.versionInfo = new VersionInfo();
|
||||||
|
|
||||||
|
this.cpuCount = Runtime.getRuntime().availableProcessors();
|
||||||
|
|
||||||
try (InputStream stream = GeyserImpl.getInstance().getBootstrap().getResource("git.properties")) {
|
try (InputStream stream = GeyserImpl.getInstance().getBootstrap().getResource("git.properties")) {
|
||||||
this.gitInfo = new Properties();
|
this.gitInfo = new Properties();
|
||||||
this.gitInfo.load(stream);
|
this.gitInfo.load(stream);
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.StringJoiner;
|
||||||
/**
|
/**
|
||||||
* Contains information about the supported protocols in Geyser.
|
* Contains information about the supported protocols in Geyser.
|
||||||
*/
|
*/
|
||||||
public class MinecraftProtocol {
|
public final class MinecraftProtocol {
|
||||||
/**
|
/**
|
||||||
* Default Bedrock codec that should act as a fallback. Should represent the latest available
|
* Default Bedrock codec that should act as a fallback. Should represent the latest available
|
||||||
* release of the game that Geyser supports.
|
* release of the game that Geyser supports.
|
||||||
|
@ -114,4 +114,7 @@ public class MinecraftProtocol {
|
||||||
|
|
||||||
return joiner.toString();
|
return joiner.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private MinecraftProtocol() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue