1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2026-01-04 15:31:36 +00:00

Fix: Allow using custom config file on Standalone, add relocation comment

This commit is contained in:
onebeastchris
2025-04-26 01:23:29 +02:00
parent aaee12e082
commit 7b55ade516
3 changed files with 7 additions and 1 deletions

View File

@@ -151,7 +151,7 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
@Override
public void onGeyserEnable() {
this.geyserConfig = new ConfigLoader(this)
this.geyserConfig = new ConfigLoader(this, configFilename)
.transformer(this::handleArgsConfigOptions)
.load(GeyserRemoteConfig.class);
if (this.geyserConfig == null) {

View File

@@ -88,6 +88,11 @@ public final class ConfigLoader {
configFile = new File(bootstrap.getConfigFolder().toFile(), "config.yml");
}
public ConfigLoader(GeyserBootstrap bootstrap, String configFileName) {
this.bootstrap = bootstrap;
configFile = new File(bootstrap.getConfigFolder().toFile(), configFileName);
}
@VisibleForTesting
ConfigLoader(File file) {
this.bootstrap = null;

View File

@@ -39,6 +39,7 @@ public interface MetricsPlatform {
boolean logResponseStatusText();
// We're not relocating on Geyser-Standalone, and using JiJ on modded platforms
default boolean disableRelocateCheck() {
PlatformType platformType = GeyserImpl.getInstance().platformType();
return platformType == PlatformType.FABRIC ||