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:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user